1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-24 04:05:39 +01:00

svtplay: fix a crash when bitrate is not zero

This commit is contained in:
Johan Andersson 2012-11-23 16:46:54 +01:00
parent 51a490274b
commit a3cd7d4966

View File

@ -24,7 +24,7 @@ import binascii
import StringIO import StringIO
import hashlib import hashlib
__version__ = "0.8.2012.11.10" __version__ = "0.8.2012.11.23"
def readbyte(data, pos): def readbyte(data, pos):
return struct.unpack("B", data[pos])[0] return struct.unpack("B", data[pos])[0]
@ -857,7 +857,7 @@ class Svtplay():
streams[int(i["bitrate"])] = stream streams[int(i["bitrate"])] = stream
if len(streams) == 1: if len(streams) == 1:
test = streams[0] test = streams[streams.keys()[0]]
else: else:
test = select_quality(self.options, streams) test = select_quality(self.options, streams)