From b937343768584f6e3b42893627e20ef176731e71 Mon Sep 17 00:00:00 2001 From: BoulderBadgeDad Date: Mon, 15 Jun 2026 10:32:04 -0700 Subject: [PATCH] video: fix stuck ep-sync banner + vanishing Play/Trailer buttons on shows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two bugs when a show's episode list backfills on view: - The 'Fetching full episode list…' banner never hid: .vd-ep-syncing (and .vd-next-ep) set display:flex, which overrode the [hidden] attribute's display:none, so el.hidden=true did nothing. Added a guard so [hidden] always wins on the detail/search/person pages. - Play & Trailer buttons vanished after the sync: reloadDetail replaced data with a fresh show_detail payload (no server/trailer — those come from extras), so renderActions re-rendered without them. reloadDetail now carries over the live extras fields (server/trailer/next_episode). --- webui/static/video/video-detail.js | 7 +++++++ webui/static/video/video-side.css | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/webui/static/video/video-detail.js b/webui/static/video/video-detail.js index fad43833..fdf1ea8c 100644 --- a/webui/static/video/video-detail.js +++ b/webui/static/video/video-detail.js @@ -771,6 +771,13 @@ .then(function (d) { showEpSyncing(false); if (!d || d.error || currentId !== id) return; + // Carry over the live extras (server / trailer / next-episode) the + // show_detail payload doesn't include, so the Play & Trailer buttons + // (and the next-ep banner) don't vanish on reload. + var prev = data || {}; + d.server = prev.server || null; + d.trailer = prev.trailer || null; + d.next_episode = prev.next_episode || null; data = d; if (!seasonByNum(selectedSeason)) { selectedSeason = d.seasons && d.seasons.length ? d.seasons[0].season_number : null; diff --git a/webui/static/video/video-side.css b/webui/static/video/video-side.css index 160d5003..4188cb08 100644 --- a/webui/static/video/video-side.css +++ b/webui/static/video/video-side.css @@ -1249,3 +1249,8 @@ a.vd-prov:hover img, a.vd-prov:hover .vd-prov-ph { border-color: rgba(var(--vd-a } @keyframes vd-ep-spin { to { transform: rotate(360deg); } } @media (prefers-reduced-motion: reduce) { .vd-ep-syncing-spin { animation: none; } } + +/* A class with an explicit `display` (e.g. .vd-ep-syncing/.vd-next-ep) otherwise + beats the UA [hidden]{display:none}, so toggling el.hidden wouldn't hide it. + Guarantee hidden always hides on the video detail/search/person pages. */ +.vd-page [hidden], .vp-page [hidden], .vsr-page [hidden] { display: none !important; }