fix(snapshot): keep every manifest tree of a shared URL and restore each track from its own tree

This commit is contained in:
imSp4rky
2026-12-02 16:56:55 -07:00
parent 50f56de957
commit 9622ebfdae
4 changed files with 149 additions and 36 deletions
+2 -2
View File
@@ -1135,7 +1135,7 @@ Requires an authenticated remote session. Otherwise it returns `404 SESSION_NOT_
Get tracks and chapters for a specific title within the remote session. Body: `{ "title_id": "..." }` (required). Unlike `list-tracks`, track objects here **include** download URLs, along with session headers/cookies and manifest data the client needs to download directly. A slow answer arrives as a [slow response](#slow-responses).
`manifests` holds each served DASH/ISM manifest once. For DASH, `filtered_period_ids` names the periods that the download skips, such as ad periods. A service can build an AdaptationSet of its own that the served manifest does not contain. `track_manifests` holds a one-track MPD for each such track, and the client re-parses that in place of the whole manifest. That MPD starts at the period of the track and keeps the content periods after it.
`manifests` holds each served DASH/ISM manifest once. One URL can have more than one entry, such as when a service merges a second manifest under the same URL. `track_ids` names the tracks that each entry restores, and the client matches such a track only in that entry's manifest. For DASH, `filtered_period_ids` names the periods that the download skips, such as ad periods. A service can build an AdaptationSet of its own that the served manifest does not contain. `track_manifests` holds a one-track MPD for each such track, and the client re-parses that in place of the whole manifest. That MPD starts at the period of the track and keeps the content periods after it.
`hls_playlists` holds the media playlist text of each HLS track that the service holds as text, with the track URL. A `file:` URL is never sent: such an entry has `url` set to `null`. The client keeps an entry only when it parses as a media playlist whose segment URIs are absolute `http` or `https` URLs, and is for the same URL as its track. Otherwise it logs `Refusing track <id>: its HLS playlist ...` and drops the track.
@@ -1149,7 +1149,7 @@ Get tracks and chapters for a specific title within the remote session. Body: `{
"subtitles": [ { "id": "s-1", "url": "https://..." } ],
"chapters": [ { "timestamp": "00:00:00.000", "name": "Intro" } ],
"attachments": [ { "url": "https://...", "name": "font.ttf", "mime_type": "font/ttf", "description": "" } ],
"manifests": [ { "type": "dash", "url": "https://...", "data": "<base64 zlib xml>", "filtered_period_ids": [ "ad-1" ] } ],
"manifests": [ { "type": "dash", "url": "https://...", "data": "<base64 zlib xml>", "track_ids": [ "v-1", "a-1" ], "filtered_period_ids": [ "ad-1" ] } ],
"track_manifests": [ { "track_id": "s-1", "type": "dash", "url": "https://...", "data": "<base64 zlib xml>" } ],
"hls_playlists": [ { "track_id": "v-1", "url": "https://...", "data": "<base64 zlib m3u8>" } ],
"session_headers": { "User-Agent": "..." },