Skip to content

Commit

Permalink
adjusted the continuing anime filter
Browse files Browse the repository at this point in the history
  • Loading branch information
pushrbx committed Jun 20, 2024
1 parent cb043f4 commit ec0af72
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion app/Repositories/DefaultAnimeRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,19 @@ public function getItemsBySeason(
],
];
if ($includeContinuingItems) {
// this condition will include "continuing" items from previous seasons
// these conditions will include "continuing" items from previous seasons
// We want to include those which are currently airing, and their aired.to is unknown, and their start
// date is before when the current season began.
$finalFilter['$or'][] = [
'aired.from' => ['$lte' => $from->toAtomString()],
'aired.to' => null,
'airing' => true
];
// We want to include those which are currently airing, and their aired.to is past the date of the
// current season start.
$finalFilter['$or'][] = [
'aired.from' => ['$lte' => $from->toAtomString()],
'aired.to' => ['$gte' => $from->toAtomString()],
'airing' => true
];
}
Expand Down

0 comments on commit ec0af72

Please sign in to comment.