Pass manifest to DASH downloader instead of re-requesting it

Fixes #51
This commit is contained in:
rlaphoenix 2023-05-11 20:46:37 +01:00
parent 5ca2f256d5
commit 3ec317e9d6
1 changed files with 2 additions and 3 deletions

View File

@ -209,7 +209,7 @@ class DASH:
tracks.add(track_type(
id_=track_id,
url=(self.url, rep, adaptation_set, period),
url=(self.url, self.manifest, rep, adaptation_set, period),
codec=track_codec,
language=track_lang,
is_original_lang=not track_lang or not language or is_close_match(track_lang, [language]),
@ -303,14 +303,13 @@ class DASH:
log = logging.getLogger("DASH")
manifest_url, representation, adaptation_set, period = track.url
manifest_url, manifest, representation, adaptation_set, period = track.url
track.drm = DASH.get_drm(
representation.findall("ContentProtection") +
adaptation_set.findall("ContentProtection")
)
manifest = load_xml(session.get(manifest_url).text)
manifest_url_query = urlparse(manifest_url).query
manifest_base_url = manifest.findtext("BaseURL")