diff options
Diffstat (limited to 'src/lib/Media')
| -rw-r--r-- | src/lib/Media/Anime/Airing/Subtitled/match.ts | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/lib/Media/Anime/Airing/Subtitled/match.ts b/src/lib/Media/Anime/Airing/Subtitled/match.ts index bad0d20d..ad26131c 100644 --- a/src/lib/Media/Anime/Airing/Subtitled/match.ts +++ b/src/lib/Media/Anime/Airing/Subtitled/match.ts @@ -159,15 +159,17 @@ export const injectAiringTime = (anime: Media, subsPlease: SubsPlease | null) => } } - const foundTime: Time | null = findClosestMatch(times, [ - anime.title.romaji, - anime.title.english, - ...anime.synonyms - ]); - - if (foundTime) { - untilAiring = secondsUntil((foundTime as Time).time, (foundTime as Time).day); - time = new Date(Date.now() + untilAiring * 1000); + if ((anime.nextAiringEpisode?.episode || 0) > 1) { + const foundTime: Time | null = findClosestMatch(times, [ + anime.title.romaji, + anime.title.english, + ...anime.synonyms + ]); + + if (foundTime) { + untilAiring = secondsUntil((foundTime as Time).time, (foundTime as Time).day); + time = new Date(Date.now() + untilAiring * 1000); + } } } |