feat(dl): change --export flag with manifest URL, subtitles, and track info

changed --export flag to export decryption keys, manifest URLs, subtitle URLs, and track info to a JSON file in the configurable exports directory. Manifest URLs are captured from DASH, ISM, and HLS parsers and propagated through the Tracks system via a new manifest_url attribute. Deduplicate Widevine/PlayReady export logic into a shared _write_export helper with dedicated EXPORT_LOCK. Add Tracks.filter() method that preserves metadata when filtering tracks by predicate.
This commit is contained in:
imSp4rky
2026-04-02 10:29:22 -06:00
parent 655e4197c3
commit fabc96ba1b
8 changed files with 97 additions and 43 deletions
+4
View File
@@ -276,6 +276,8 @@ class Service(metaclass=ABCMeta):
raise
if first:
all_tracks.add(hdr_tracks, warn_only=True)
if hdr_tracks.manifest_url and not all_tracks.manifest_url:
all_tracks.manifest_url = hdr_tracks.manifest_url
first = False
else:
for video in hdr_tracks.videos:
@@ -299,6 +301,8 @@ class Service(metaclass=ABCMeta):
raise
if first:
all_tracks.add(tracks, warn_only=True)
if tracks.manifest_url and not all_tracks.manifest_url:
all_tracks.manifest_url = tracks.manifest_url
first = False
else:
for video in tracks.videos: