diff --git a/webui/static/video/video-discover.js b/webui/static/video/video-discover.js index 7c9e65e8..c802b15a 100644 --- a/webui/static/video/video-discover.js +++ b/webui/static/video/video-discover.js @@ -156,9 +156,9 @@ return [ { id: 'foryou', label: 'For you', rails: foryou }, { id: 'topten', label: 'Top 10 today', rails: [TOP10] }, + { id: 'new', label: 'New & noteworthy', rails: NEW_RAILS }, { id: 'collection', label: 'Finish your collection', rails: [] }, { id: 'taste', label: 'More of what you like', rails: taste }, - { id: 'new', label: 'New & noteworthy', rails: NEW_RAILS }, { id: 'popular', label: 'Trending & popular', rails: CURATED }, { id: 'mood', label: 'By mood', rails: MOOD_RAILS }, { id: 'studios', label: 'From the studios', rails: STUDIO_RAILS }, @@ -633,10 +633,15 @@ var rail = $('[data-vdsc-rail]', shelf); var grp = shelf.closest('.vdsc-group'); var ranked = shelf.getAttribute('data-vdsc-ranked') === '1'; + var hideOwned = isHideOwned(); // Normal: 2 pages (~40 items). Hiding owned: let the backend page DEEPER and drop // owned server-side, so a huge library's rail still fills instead of CSS-hiding to ~nothing. - // Ranked (Top 10): a single fixed chart — never paged, capped at 10. - var q = shelf.getAttribute('data-vdsc-q') + (ranked ? '' : (isHideOwned() ? '&hide_owned=1' : '&pages=2')); + // Ranked (Top 10): a single fixed chart — never paged, capped at 10. It must ALSO honour + // hide-owned at fetch time: the global `.vdsc-hide-owned .vsr-card--owned{display:none}` + // rule would otherwise hide an owned card while its rank numeral stayed, leaving a gap. + var q = shelf.getAttribute('data-vdsc-q') + + (ranked ? (hideOwned ? '&hide_owned=1' : '') + : (hideOwned ? '&hide_owned=1' : '&pages=2')); cachedFetch(LIST_URL + '?' + q) .then(function (d) { var items = (d && d.items) || []; diff --git a/webui/static/video/video-side.css b/webui/static/video/video-side.css index 9b4cd94e..6635f338 100644 --- a/webui/static/video/video-side.css +++ b/webui/static/video/video-side.css @@ -2405,6 +2405,10 @@ body[data-side="video"] #soulsync-toggle { display: none; } font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, 0.7); cursor: pointer; user-select: none; } .vdsc-toggle input { accent-color: rgb(var(--accent-rgb, 88 101 242)); width: 16px; height: 16px; cursor: pointer; } .vdsc-hide-owned .vsr-card--owned { display: none; } +/* …except in the ranked Top 10 — hiding an owned card there would strand its big + rank numeral as a gap. The rail also drops owned server-side, so this only matters + if one ever slips through: show it (with its 'In Library' ribbon) instead. */ +.vdsc-hide-owned .vdsc-shelf--ranked .vsr-card--owned { display: flex; } /* rail-language preference chips — which original languages show in the general rails */ .vdsc-langs { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-left: 14px; }