fix(downloads): block ambiguous episode actions

This commit is contained in:
4gray committed 2026-08-02 19:10:58 +02:00
1 parent ee7041e3c2
commit 339dbde3c4
8 files changed
+136 -54

No files matched your search

+13 -11
View File
@@ -80,17 +80,19 @@ variants, contextual buttons, and theme-aware styling.
The exact `(playlistId, contentType, xtreamId)` identity is authoritative.
Complete `(playlistId, seriesXtreamId, seasonNumber, episodeNumber)`
coordinates are a legacy episode-compatibility fallback; ambiguous or
conflicting matches fail closed, while restarting an eligible legacy row
migrates it to the canonical id. Renderer-pending, queued, downloading, and
paused episodes are skipped, as are completed rows whose file is available
or whose availability is still unknown. Failed, canceled, completed-missing,
and row-less episodes are eligible; a completed-missing row is restarted as
a fresh download. `DOWNLOADS_START` remains the only start IPC and may return
the stable `reason: 'already-in-progress'` for an active match, which the
coordinator counts as skipped. There is no batch IPC, schema migration,
parallel transfer, or queue reordering: destination authorization, persisted
header handling, and the backend's one-active-transfer FIFO semantics remain
unchanged.
conflicting matches resolve to an explicit renderer conflict state rather
than masquerading as a missing row. Both the episode action and season count
fail closed for that state, while restarting an eligible legacy row migrates
it to the canonical id. Renderer-pending, queued, downloading, and paused
episodes are skipped, as are completed rows whose file is available or whose
availability is still unknown. Failed, canceled, completed-missing, and
unambiguous row-less episodes are eligible; a completed-missing row is
restarted as a fresh download. `DOWNLOADS_START` remains the only start IPC
and may return the stable `reason: 'already-in-progress'` for an active match,
which the coordinator counts as skipped. There is no batch IPC, schema
migration, parallel transfer, or queue reordering: destination authorization,
persisted header handling, and the backend's one-active-transfer FIFO
semantics remain unchanged.
- **Pure manager model**
(`download-manager.viewmodel.ts` and `download-library.viewmodel.ts`)
derives the current route scope, search/category filtering, queue partitions,