mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-11 23:39:29 +01:00
[zdf] Correct order of unknown formats (#1936)
This commit is contained in:
parent
475700acfe
commit
5a3ea17c94
@ -73,14 +73,14 @@ def xml_to_format(fnode):
|
|||||||
try:
|
try:
|
||||||
proto_pref = -PROTO_ORDER.index(format_m.group('proto'))
|
proto_pref = -PROTO_ORDER.index(format_m.group('proto'))
|
||||||
except ValueError:
|
except ValueError:
|
||||||
proto_pref = 999
|
proto_pref = -999
|
||||||
|
|
||||||
quality = fnode.find('./quality').text
|
quality = fnode.find('./quality').text
|
||||||
QUALITY_ORDER = ['veryhigh', '300', 'high', 'med', 'low']
|
QUALITY_ORDER = ['veryhigh', '300', 'high', 'med', 'low']
|
||||||
try:
|
try:
|
||||||
quality_pref = -QUALITY_ORDER.index(quality)
|
quality_pref = -QUALITY_ORDER.index(quality)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
quality_pref = 999
|
quality_pref = -999
|
||||||
|
|
||||||
abr = int(fnode.find('./audioBitrate').text) // 1000
|
abr = int(fnode.find('./audioBitrate').text) // 1000
|
||||||
vbr = int(fnode.find('./videoBitrate').text) // 1000
|
vbr = int(fnode.find('./videoBitrate').text) // 1000
|
||||||
|
Loading…
Reference in New Issue
Block a user