From dedfb2a31725b8299515686a70b711fda04c134a Mon Sep 17 00:00:00 2001
From: Fuwn <contact@fuwn.me>
Date: Sun, 17 Dec 2023 06:53:58 -0800
Subject: fix(anime): position of subbed release

---
 src/lib/List/Anime/DueAnimeList.svelte | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

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

diff --git a/src/lib/List/Anime/DueAnimeList.svelte b/src/lib/List/Anime/DueAnimeList.svelte
index 270fc4ae..6bb3ea4f 100644
--- a/src/lib/List/Anime/DueAnimeList.svelte
+++ b/src/lib/List/Anime/DueAnimeList.svelte
@@ -6,6 +6,8 @@
 	import settings from '../../../stores/settings';
 	import lastPruneTimes from '../../../stores/lastPruneTimes';
 	import AnimeList from './AnimeListTemplate.svelte';
+	import type { SubsPlease } from '$lib/subsPlease';
+	import { injectAiringTime } from '$lib/Media/Anime/airing';
 
 	export let user: AniListAuthorisation;
 	export let identity: UserIdentity;
@@ -34,7 +36,11 @@
 
 	onDestroy(() => clearInterval(keyCacher));
 
-	const cleanMedia = (anime: Media[], displayUnresolved: boolean) => {
+	const cleanMedia = (
+		anime: Media[],
+		displayUnresolved: boolean,
+		subsPlease: SubsPlease | null
+	) => {
 		if (anime === undefined) return [];
 
 		let dueAnime = anime
@@ -58,7 +64,8 @@
 					media.nextAiringEpisode = { episode: -1 };
 
 				return media;
-			});
+			})
+			.map((media) => injectAiringTime(media, subsPlease));
 
 		if (!displayUnresolved)
 			dueAnime = dueAnime.filter((media: Media) => media.nextAiringEpisode?.episode !== -1);
-- 
cgit v1.2.3

