mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-11 02:46:16 -08:00
refactor(portals): lift the VOD route's orchestration out of the component
The details route had grown to 864 lines — the repository's hard maximum is 400, and while the file predates the rule, a baselined exemption is not a budget to spend. Three component-provided services now hold what the component was accumulating: `VodDetailsMultiSourceUiService` (the playback-evidence latch, the caption, the primary button's position, source actions and the failover toast), `VodDetailsSimilarService` (the rail and its cross-portal lookup), and `VodDetailsDownloadsService`. The component keeps its public API, so the template and the existing specs are untouched. 864 -> 566 lines. The downloads move also fixes a latent bug: `downloadVod` and `playFromLocal` read `route.snapshot.params`, which is stale once the router reuses this component for detail-to-detail navigation (the Similar rail) — so a download started from a film reached that way fetched the previous one. They now read the same route-params signal everything else uses, with a regression test. Also from review: pins are applied on the FRESH-import path too. A new playlist has no content when the archive is read, so its user state is parked and replayed after the import — the merge path I wired first never ran there, and every pin was dropped. A failed pin write now propagates instead of being ignored: the backup entry is reported failed, and the parked state is kept so a transient failure can be retried rather than silently losing the preference. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
7eaa681352
commit
a25412ea61
12 files changed
+761
-356
No files matched your search
@@ -478,6 +478,14 @@ Two things read it, and they must agree: the "Playing from" caption, and the
|
||||
source row's badge — which reads `Current` when a source is merely selected and
|
||||
`Playing` once one really is.
|
||||
|
||||
## Where the route's code lives
|
||||
|
||||
`VodDetailsRouteComponent` is a thin host. The multi-source concerns it grew
|
||||
live in `VodDetailsMultiSourceUiService` (component-provided): the
|
||||
`playbackLive` evidence, the caption, the primary button's position, the
|
||||
source actions, and the failover toast. The "Similar" rail and offline
|
||||
downloads sit in their own component-provided services beside it.
|
||||
|
||||
## Backup
|
||||
|
||||
Pins ride along with playlist backup, under the playlist they point at, as the
|
||||
|
||||
Reference in new issue
Block a user