From 3ec317e9d6625743a4c22195b3f78b3de7e0ad60 Mon Sep 17 00:00:00 2001 From: rlaphoenix Date: Thu, 11 May 2023 20:46:37 +0100 Subject: [PATCH] Pass manifest to DASH downloader instead of re-requesting it Fixes #51 --- devine/core/manifests/dash.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/devine/core/manifests/dash.py b/devine/core/manifests/dash.py index f7fb368..8f4a5b4 100644 --- a/devine/core/manifests/dash.py +++ b/devine/core/manifests/dash.py @@ -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")