diff --git a/src/pages/TVPage.jsx b/src/pages/TVPage.jsx index 9d46cfc5..dfd29896 100644 --- a/src/pages/TVPage.jsx +++ b/src/pages/TVPage.jsx @@ -2524,6 +2524,23 @@ const _todayForEpisodes = (() => { return d; })(); +function getDaysUntilRelease(airDate) { + if (!airDate) return ""; + + const target = new Date(airDate); + target.setHours(0, 0, 0, 0); + + const today = new Date(); + today.setHours(0, 0, 0, 0); + + const diffMs = target - today; + const days = Math.round(diffMs / (1000 * 60 * 60 * 24)); + + if (days <= 0) return "Releasing today"; + if (days === 1) return "1 day left"; + return `${days} days left`; +} + const EpisodeCard = memo(function EpisodeCard({ ep, itemId, @@ -2587,6 +2604,7 @@ const EpisodeCard = memo(function EpisodeCard({ ) : epUnreleased ? (
🔒Unreleased + {getDaysUntilRelease(ep.air_date)}
) : isPlaying ? (
diff --git a/src/styles/global.css b/src/styles/global.css index 48c52830..168f3e34 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -2491,7 +2491,7 @@ kbd { align-items: center; justify-content: center; gap: 4px; - font-size: 18px; + font-size: 12px; border-radius: inherit; }