1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-27 21:54:17 +01:00

download_hds: dont hardcode metadata size.

This commit is contained in:
Johan Andersson 2013-03-10 13:40:54 +01:00 committed by Olof Johansson
parent 8485218b75
commit 82340f086c

View File

@ -57,7 +57,10 @@ def download_hds(options, url, swf=None):
else:
file_d = sys.stdout
file_d.write(binascii.a2b_hex(b"464c56010500000009000000001200010c00000000000000"))
metasize = struct.pack(">L", len(base64.b64decode(test["metadata"])))[1:]
file_d.write(binascii.a2b_hex(b"464c560105000000090000000012"))
file_d.write(metasize)
file_d.write(binascii.a2b_hex(b"00000000000000"))
file_d.write(base64.b64decode(test["metadata"]))
file_d.write(binascii.a2b_hex(b"00000000"))
total = antal[1]["total"]