Fix FutureWarning when getting segment URLs from SegmentTemplate

This commit is contained in:
rlaphoenix 2023-02-08 12:56:26 +00:00
parent 23153f0078
commit 0a5f359217
1 changed files with 4 additions and 1 deletions

View File

@ -356,7 +356,10 @@ class DASH:
fallback_query: Optional[str] = None fallback_query: Optional[str] = None
) -> list[str]: ) -> list[str]:
segment_urls: list[str] = [] segment_urls: list[str] = []
segment_template = representation.find("SegmentTemplate") or fallback_segment_template if representation.find("SegmentTemplate") is not None:
segment_template = representation.find("SegmentTemplate")
else:
segment_template = fallback_segment_template
base_url = representation.findtext("BaseURL") or fallback_base_url base_url = representation.findtext("BaseURL") or fallback_base_url
if segment_template is None: if segment_template is None: