mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-11-14 13:05:09 +00:00
fix(manifests): skip filtered dash periods after the main content and keep them over export
A manifest snapshot module now saves and restores DASH/ISM parser state for --remote and export/import, so an import keeps the service's period filter without fetching the manifest.
This commit is contained in:
@@ -1091,7 +1091,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. A service can build an AdaptationSet of its own that the served manifest does not contain. `track_manifests` holds a one-AdaptationSet MPD for each such track, and the client re-parses that in place of the whole manifest.
|
||||
`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.
|
||||
|
||||
=== "Response `200`"
|
||||
|
||||
@@ -1103,7 +1103,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>" } ],
|
||||
"manifests": [ { "type": "dash", "url": "https://...", "data": "<base64 zlib xml>", "filtered_period_ids": [ "ad-1" ] } ],
|
||||
"track_manifests": [ { "track_id": "s-1", "type": "dash", "url": "https://...", "data": "<base64 zlib xml>" } ],
|
||||
"session_headers": { "User-Agent": "..." },
|
||||
"session_cookies": { "sid": "..." },
|
||||
|
||||
@@ -213,8 +213,9 @@ hood the client walks a remote session through its lifecycle.
|
||||
chosen title. The tracks come back with playback URLs, and the server ships
|
||||
DASH/ISM manifests as compressed XML so the client can re-parse them locally for
|
||||
downloading. A service can build an AdaptationSet of its own that the served
|
||||
manifest does not contain. Each such track gets a one-AdaptationSet MPD in
|
||||
`track_manifests`, and the client re-parses that instead. Any
|
||||
manifest does not contain. Each such track gets a one-track MPD in
|
||||
`track_manifests`, with the content periods after its own, and the client
|
||||
re-parses that instead. The client skips the same DASH periods as the server. Any
|
||||
`session_headers` and cookies the server used are merged into the
|
||||
client's local HTTP session. Each cookie in `session_cookie_jar` keeps its
|
||||
domain, path and `secure` flag, so it goes only to its own hosts. `session_cookies` carries
|
||||
|
||||
@@ -269,7 +269,7 @@ unshackle logs in to the service before the search. A service that declares a se
|
||||
|
||||
## `import`
|
||||
|
||||
Reconstruct a download (download → decrypt → mux) from an `--export` JSON file without re-contacting the service. It re-fetches the manifest, injects the stored keys, and then runs the normal `dl` pipeline. The service tag is read from the export file, not passed by you.
|
||||
Reconstruct a download (download → decrypt → mux) from an `--export` JSON file without re-contacting the service. It uses the DASH or ISM manifest that the export saved, or fetches the manifest again when the export has none. It injects the stored keys and then runs the normal `dl` pipeline. The service tag is read from the export file, not passed by you.
|
||||
|
||||
```
|
||||
unshackle import EXPORT_FILE [DL_ARGS...]
|
||||
|
||||
@@ -913,8 +913,10 @@ unshackle dl --skip-dl EXAMPLE 81234567
|
||||
|
||||
`--export` writes a `mediaexport` JSON file into the configured exports directory. It holds
|
||||
the manifest, the DRM init data, the content keys, the KIDs of each track and the title
|
||||
metadata for each title. `unshackle import` reads it to reconstruct a download later, and gives
|
||||
each track only the content keys for its KIDs. The importer also reads the
|
||||
metadata for each title. For a DASH or ISM title, it also holds the manifest as the service
|
||||
left it, with the ad periods that the service skips. `unshackle import` reads it to reconstruct
|
||||
a download later, and gives each track only the content keys for its KIDs. The import uses the
|
||||
saved manifest, so it skips the same periods and does not fetch the manifest again. The importer also reads the
|
||||
older unshackle `version: 2` files and unidl's own export files.
|
||||
|
||||
```shell title="Export track info and keys"
|
||||
|
||||
Reference in New Issue
Block a user