From 96cf2121068d9f429f2c04b7f35ceecf50ab7468 Mon Sep 17 00:00:00 2001 From: Rushil Perera Date: Tue, 3 Sep 2024 22:06:52 -0400 Subject: [PATCH] fix: change upcoming titles to only notify about Japanese titles --- src/controllers/upcoming-titles/anilist.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/controllers/upcoming-titles/anilist.ts b/src/controllers/upcoming-titles/anilist.ts index 662f753..d03a2ec 100644 --- a/src/controllers/upcoming-titles/anilist.ts +++ b/src/controllers/upcoming-titles/anilist.ts @@ -69,7 +69,8 @@ export async function getUpcomingTitlesFromAnilist(env: Env) { const { airingSchedules, pageInfo } = Page!; scheduleList = scheduleList.concat( airingSchedules!.filter( - (schedule): schedule is AiringSchedule => !!schedule, + (schedule): schedule is AiringSchedule => + !!schedule && schedule.media?.countryOfOrigin === "JP", ), ); shouldContinue = pageInfo?.hasNextPage ?? false;