From 92dc2b4904113dc1926343317e2da5a08d86d049 Mon Sep 17 00:00:00 2001
From: Fuwn <contact@fuwn.me>
Date: Sat, 3 Feb 2024 08:44:49 -0800
Subject: fix(anime): unaired subtitle episode

---
 src/lib/Media/Anime/Airing/AiringTime.svelte | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

(limited to 'src/lib/Media/Anime/Airing/AiringTime.svelte')

diff --git a/src/lib/Media/Anime/Airing/AiringTime.svelte b/src/lib/Media/Anime/Airing/AiringTime.svelte
index 802b766b..3fe8df2e 100644
--- a/src/lib/Media/Anime/Airing/AiringTime.svelte
+++ b/src/lib/Media/Anime/Airing/AiringTime.svelte
@@ -15,7 +15,7 @@
 	let opacity = 100;
 	let timeFrame = '';
 	let time = '';
-	let nextEpisode = 0;
+	let nextEpisode = anime.nextAiringEpisode?.episode || 0;
 	let few = true;
 	let dateString = '';
 
@@ -100,12 +100,6 @@
 			}
 
 			opacity = Math.max(50, 100 - (untilAiring / 60 / 60 / 24 / 7) * 50);
-			nextEpisode =
-				anime.nextAiringEpisode?.nativeAiringAt &&
-				!upcoming &&
-				anime.nextAiringEpisode.nativeAiringAt < Date.now() / 1000 + 1 * 6 * 60 * 60
-					? anime.nextAiringEpisode.episode - 1
-					: anime.nextAiringEpisode?.episode || 0;
 			dateString =
 				new Date(airingAt ? airingAt * 1000 : 0).toLocaleDateString([], {
 					weekday: 'long',
-- 
cgit v1.2.3

