mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-27 21:54:17 +01:00
hdsparse: in some cases we only have one bootstrap that is shared between all streams
This commit is contained in:
parent
0d9e7a00f0
commit
401bb08a78
@ -53,11 +53,18 @@ def hdsparse(options, manifest):
|
|||||||
mediaIter = xml.iter("{http://ns.adobe.com/f4m/1.0}media")
|
mediaIter = xml.iter("{http://ns.adobe.com/f4m/1.0}media")
|
||||||
|
|
||||||
for i in bootstrapIter:
|
for i in bootstrapIter:
|
||||||
|
if "id" in i.attrib:
|
||||||
bootstrap[i.attrib["id"]] = i.text
|
bootstrap[i.attrib["id"]] = i.text
|
||||||
|
else:
|
||||||
|
bootstrap["0"] = i.text
|
||||||
parse = urlparse(manifest)
|
parse = urlparse(manifest)
|
||||||
querystring = parse.query
|
querystring = parse.query
|
||||||
for i in mediaIter:
|
for i in mediaIter:
|
||||||
streams[int(i.attrib["bitrate"])] = HDS(options, i.attrib["url"], i.attrib["bitrate"], manifest=manifest, bootstrap=bootstrap[i.attrib["bootstrapInfoId"]],
|
if len(bootstrap) == 1:
|
||||||
|
bootstrapid = bootstrap["0"]
|
||||||
|
else:
|
||||||
|
bootstrapid = bootstrap[i.attrib["bootstrapInfoId"]]
|
||||||
|
streams[int(i.attrib["bitrate"])] = HDS(options, i.attrib["url"], i.attrib["bitrate"], manifest=manifest, bootstrap=bootstrapid,
|
||||||
metadata=i.find("{http://ns.adobe.com/f4m/1.0}metadata").text, querystring=querystring)
|
metadata=i.find("{http://ns.adobe.com/f4m/1.0}metadata").text, querystring=querystring)
|
||||||
return streams
|
return streams
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user