From fcc87ac317a532c844720f298bbcc7f1904b6d0a Mon Sep 17 00:00:00 2001 From: stabbedbybrick <125766685+stabbedbybrick@users.noreply.github.com> Date: Tue, 10 Sep 2024 08:59:33 +0200 Subject: [PATCH] fix(TUBI): Fix missing base_uri in track.url --- services/TUBI/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/TUBI/__init__.py b/services/TUBI/__init__.py index 6c8c055..2535e85 100644 --- a/services/TUBI/__init__.py +++ b/services/TUBI/__init__.py @@ -5,6 +5,7 @@ import re from collections.abc import Generator from http.cookiejar import CookieJar from typing import Any, Optional +from urllib.parse import urljoin import click import m3u8 @@ -175,7 +176,7 @@ class TUBI(Service): tracks = HLS.from_url(url=self.manifest, session=self.session).to_tracks(language=title.language) for track in tracks: master = m3u8.loads(self.session.get(track.url).text, uri=track.url) - track.url = master.segments[0].uri + track.url = urljoin(master.base_uri, master.segments[0].uri) track.descriptor = Track.Descriptor.URL if title.data.get("subtitles"):