From 640bda31287076f01077a2f1e564bedbd39cce30 Mon Sep 17 00:00:00 2001 From: Miguel Palhas Date: Wed, 26 Aug 2026 13:05:30 +0100 Subject: [PATCH] fix(web): show download chip on movie detail (#267) --- web/src/main.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/web/src/main.ts b/web/src/main.ts index 0cacd02..b2e8905 100644 --- a/web/src/main.ts +++ b/web/src/main.ts @@ -405,6 +405,7 @@ function main() { repaintDownloads = () => { library.repaintDownloads(); seriesDetail.repaintDownloads(); + movieDetail.repaintDownloads(); }; refreshQueuesBadge = () => { void queues.refreshBadge(); @@ -2294,6 +2295,8 @@ interface MovieView { * surface underneath repaints instead of listing something that is gone. */ setRemoved: (handler: (parent: Route) => void) => void; + /** §9.8: repaint only while the page is open (issue #267). */ + repaintDownloads: () => void; } /** The eligible bucket always shows; waived and rejected collapse to counts. */ @@ -2566,6 +2569,17 @@ function movieMain(views: HideableView[]): MovieView { if (movie.blocked) { chipsEl.append(chip(NO_TARGETED_SEARCH)); } + // §9.8: the hero is the row that owns the item, same as the library row + const download = downloadChip("movie", movie.id); + if (download !== null) { + chipsEl.append(download); + } + } + + function repaintDownloads() { + if (!view.hidden) { + paintIdentity(); + } } function paintRootOptions() { @@ -3143,6 +3157,7 @@ function movieMain(views: HideableView[]): MovieView { setRemoved: (handler: (parent: Route) => void) => { removed = handler; }, + repaintDownloads, }; }