From cb5ae93f76fde0ca2da0aedb697d1992d5362720 Mon Sep 17 00:00:00 2001 From: BoulderBadgeDad Date: Wed, 17 Jun 2026 19:11:30 -0700 Subject: [PATCH] Channel page: restore the season view toggle (rail posters etc.) broken by search/sort The search/sort change hardcoded pillsHTML() for the youtube branch, so the view toggle did nothing and the rail view's season posters vanished. The youtube branch now honours seasonView (rail / timeline / tabs / list) for the year nav, with the new search+sort controls stacked above it; flat mode (search / most- viewed / longest) still hides the per-year nav. Default view (rail) shows the year posters again. --- webui/static/video/video-detail.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/webui/static/video/video-detail.js b/webui/static/video/video-detail.js index 1a1a176a..3900e5e0 100644 --- a/webui/static/video/video-detail.js +++ b/webui/static/video/video-detail.js @@ -879,9 +879,16 @@ function renderSeasonNav() { var host = q('[data-vd-season-nav]'); if (!host || !data || !data.seasons.length) { if (host) host.innerHTML = ''; return; } - if (data.source === 'youtube') { // channels: search + sort controls, then year pills (hidden in flat mode) - host.className = 'vd-season-nav vd-season-nav--yt'; - host.innerHTML = ytControlsHTML() + (ytFlatMode() ? '' : pillsHTML()); + if (data.source === 'youtube') { // channels: search + sort controls above the + // year nav — which still honours the view toggle (rail posters, timeline, + // tabs, list). Flat mode (search / most-viewed / longest) hides the nav. + host.className = 'vd-season-nav vd-season-nav--yt vd-season-nav--' + seasonView; + var nav = ytFlatMode() ? '' + : seasonView === 'rail' ? railHTML() + : seasonView === 'timeline' ? timelineHTML() + : seasonView === 'pills' ? pillsHTML() + : dropdownHTML(); + host.innerHTML = ytControlsHTML() + nav; return; } host.className = 'vd-season-nav vd-season-nav--' + seasonView;