From 60110fe8f23c53c837aff82d77a21ad8af4b5bb2 Mon Sep 17 00:00:00 2001
From: Fuwn <contact@fuwn.net>
Date: Sun, 1 Mar 2026 14:39:20 -0800
Subject: fix(anime): unify due classification and harden subtitle matching

---
 src/lib/List/Anime/UpcomingAnimeList.svelte | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'src/lib/List/Anime/UpcomingAnimeList.svelte')

diff --git a/src/lib/List/Anime/UpcomingAnimeList.svelte b/src/lib/List/Anime/UpcomingAnimeList.svelte
index 4f285b47..a2cc963d 100644
--- a/src/lib/List/Anime/UpcomingAnimeList.svelte
+++ b/src/lib/List/Anime/UpcomingAnimeList.svelte
@@ -12,6 +12,7 @@
   import locale from '$stores/locale';
   import identity from '$stores/identity';
   import { injectAiringTime } from '$lib/Media/Anime/Airing/Subtitled/match';
+  import { hasDueEpisodes, hasNoAiredEpisodes } from '$lib/Media/Anime/Airing/classify';
   import revalidateAnime from '$stores/revalidateAnime';
 
   export let user: AniListAuthorisation;
@@ -43,14 +44,13 @@
           (media: Media) =>
             // Outdated media
             ($settings.displayPlannedAnime ? media.mediaListEntry?.status === 'PLANNING' : false) ||
-            (media.nextAiringEpisode || { episode: 0 }).episode - 1 <=
-              (media.mediaListEntry || { progress: 0 }).progress
+            !hasDueEpisodes(media)
         )
         .map((media: Media) => {
           // Adjust for planned anime
           if (
             ($settings.displayPlannedAnime ? media.episodes !== 1 : true) &&
-            (media.nextAiringEpisode || { episode: 0 }).episode - 1 <= 0
+            hasNoAiredEpisodes(media)
           )
             media.nextAiringEpisode = { episode: -1 };
 
-- 
cgit v1.2.3

