1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-28 06:04:17 +01:00

dash: don't crash if we get a total files.

fixes #559
This commit is contained in:
Johan Andersson 2017-02-12 11:08:22 +01:00
parent da66ffcf2e
commit 3d8a516d1c

View File

@ -76,6 +76,7 @@ def parsesegments(content, url):
init = vinit.attrib["initialization"]
nrofvideos = content[0].findall(".//{urn:mpeg:dash:schema:mpd:2011}S[@r]")
selemtns = content[0].findall(".//{urn:mpeg:dash:schema:mpd:2011}S")
total = 0
if nrofvideos:
total = int(nrofvideos[0].attrib["r"]) + len(selemtns) + 1
time = False