Merge branch 'master' into automated-tests

This commit is contained in:
pushrbx 2024-01-29 14:08:23 +00:00 committed by GitHub
commit bcd8e40661
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 21 additions and 9 deletions

View File

@ -11,12 +11,15 @@ use Spatie\Enum\Laravel\Enum;
* @method static self special()
* @method static self ona()
* @method static self music()
* @method static self cm()
* @method static self pv()
* @method static self tv_special()
*
* @OA\Schema(
* schema="anime_search_query_type",
* description="Available Anime types",
* type="string",
* enum={"tv","movie","ova","special","ona","music","cm","pv","tv-special"}
* enum={"tv","movie","ova","special","ona","music","cm","pv","tv_special"}
* )
*/
final class AnimeTypeEnum extends Enum
@ -32,7 +35,7 @@ final class AnimeTypeEnum extends Enum
'music' => 'Music',
'cm' => 'CM',
'pv' => 'PV',
'tv-special' => 'TV Special'
'tv_special' => 'TV Special'
];
}
}

View File

@ -17,7 +17,7 @@ use Spatie\Enum\Laravel\Enum;
* schema="manga_search_query_type",
* description="Available Manga types",
* type="string",
* enum={"manga","novel", "lightnovel", "oneshot","doujin","manhwa","manhua","one-shot"}
* enum={"manga","novel", "lightnovel", "oneshot","doujin","manhwa","manhua"}
* )
*/
final class MangaTypeEnum extends Enum
@ -31,8 +31,7 @@ final class MangaTypeEnum extends Enum
'oneshot' => 'One-shot',
'doujin' => 'Doujinshi',
'manhwa' => 'Manhwa',
'manhua' => 'Manhua',
'one-shot' => 'One-shot'
'manhua' => 'Manhua'
];
}
}

View File

@ -20,7 +20,7 @@ class ScheduleController extends Controller
* in="query",
* required=false,
* description="Filter by day",
* @OA\Schema(type="string",enum={"monday", "tuesday", "wednesday", "thursday", "friday", "unknown", "other"})
* @OA\Schema(type="string",enum={"monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday", "unknown", "other"})
* ),
*
* @OA\Parameter(

View File

@ -130,16 +130,25 @@ final class DefaultAnimeRepository extends DatabaseRepository implements AnimeRe
$finalFilter = [];
// if the premiered parameter for the filter is not null, look for those items which have a premiered attribute set,
// and equals to the parameter value, OR look for those items which doesn't have premired attribute set,
// they don't have a garbled aired string and their aired.from date is within the from-to parameters range
if ($premiered !== null) {
$finalFilter['$or'] = [
["premiered" => $premiered],
[
"premiered" => null,
"aired.string" => [
'$not' => ['$regex' => "{$from->year} to ?"]
],
...$airedFilter
]
];
} else {
$finalFilter = array_merge($finalFilter, $airedFilter);
$finalFilter["aired.string"] = [
'$not' => ['$regex' => "{$from->year} to ?"]
];
}
if (!is_null($type)) {

View File

@ -2299,6 +2299,8 @@
"wednesday",
"thursday",
"friday",
"saturday",
"sunday",
"unknown",
"other"
]
@ -4261,7 +4263,7 @@
"music",
"cm",
"pv",
"tv-special"
"tv_special"
]
},
"characters_search_query_orderby": {
@ -4390,8 +4392,7 @@
"oneshot",
"doujin",
"manhwa",
"manhua",
"one-shot"
"manhua"
]
},
"people_search_query_orderby": {