From 8b69fc9fd4a692b9a7c93fad524303893f9c16c3 Mon Sep 17 00:00:00 2001
From: Fuwn <contact@fuwn.me>
Date: Fri, 5 Jan 2024 22:18:24 -0800
Subject: fix(schedule): airing episode

---
 src/lib/Tools/Schedule/Tool.svelte | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'src/lib/Tools/Schedule/Tool.svelte')

diff --git a/src/lib/Tools/Schedule/Tool.svelte b/src/lib/Tools/Schedule/Tool.svelte
index 60828a7f..ba24ca68 100644
--- a/src/lib/Tools/Schedule/Tool.svelte
+++ b/src/lib/Tools/Schedule/Tool.svelte
@@ -161,7 +161,8 @@
 										<span class:countdown={$settings.displayCountdownRightAligned}>
 											{#if media && media.nextAiringEpisode}
 												<span style="opacity: 50%;">
-													{media.nextAiringEpisode?.episode > 1
+													{new Date((media.nextAiringEpisode?.airingAt || 0) * 1000) > new Date() &&
+													day === new Date().toLocaleString('en-us', { weekday: 'long' })
 														? media.nextAiringEpisode?.episode - 1
 														: media.nextAiringEpisode?.episode}{media.episodes
 														? `/${media.episodes}`
-- 
cgit v1.2.3

