fix: upcoming titles notifying about titles that are already airing

This commit is contained in:
2024-09-08 17:42:28 -05:00
parent cc9bb8ab4d
commit 38195776c2

View File

@@ -69,7 +69,9 @@ export async function getUpcomingTitlesFromAnilist(env: Env) {
scheduleList = scheduleList.concat(
airingSchedules!.filter(
(schedule): schedule is AiringSchedule =>
!!schedule && schedule.media?.countryOfOrigin === "JP",
!!schedule &&
schedule.media?.countryOfOrigin === "JP" &&
schedule.episode == 1,
),
);
shouldContinue = pageInfo?.hasNextPage ?? false;