From 3d8a516d1c63a984bd5c6f184e7af28154bc34e6 Mon Sep 17 00:00:00 2001 From: Johan Andersson Date: Sun, 12 Feb 2017 11:08:22 +0100 Subject: [PATCH] dash: don't crash if we get a total files. fixes #559 --- lib/svtplay_dl/fetcher/dash.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/svtplay_dl/fetcher/dash.py b/lib/svtplay_dl/fetcher/dash.py index ed841bf..991b2a8 100644 --- a/lib/svtplay_dl/fetcher/dash.py +++ b/lib/svtplay_dl/fetcher/dash.py @@ -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