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

select_qualtiy: it wants ints.

This commit is contained in:
Johan Andersson 2014-04-27 13:19:56 +02:00
parent 383c0650d7
commit 2eb9af443a

View File

@ -106,7 +106,7 @@ def check_redirect(url):
return url
def select_quality(options, streams):
available = sorted(x.bitrate for x in streams)
available = sorted(int(x.bitrate) for x in streams)
try:
optq = int(options.quality)
@ -136,9 +136,8 @@ def select_quality(options, streams):
log.error("Can't find that quality. Try one of: %s (or try --flexible-quality)",
", ".join([str(elm) for elm in available]))
sys.exit(4)
for i in streams:
if i.bitrate == selected:
if int(i.bitrate) == selected:
stream = i
return stream