aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/utils/_utils.py
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2023-06-22 10:02:38 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2023-06-22 13:31:07 +0530
commit812cdfa06c33a40e73a8e04b3e6f42c084666a43 (patch)
tree6745122f200a08950e350d7215e7cf55be55f128 /yt_dlp/utils/_utils.py
parentcd810afe2ac5567c822b7424800fc470ef2d0045 (diff)
downloadhypervideo-pre-812cdfa06c33a40e73a8e04b3e6f42c084666a43.tar.lz
hypervideo-pre-812cdfa06c33a40e73a8e04b3e6f42c084666a43.tar.xz
hypervideo-pre-812cdfa06c33a40e73a8e04b3e6f42c084666a43.zip
[cleanup] Misc
Diffstat (limited to 'yt_dlp/utils/_utils.py')
-rw-r--r--yt_dlp/utils/_utils.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/yt_dlp/utils/_utils.py b/yt_dlp/utils/_utils.py
index 56acadd73..10052009f 100644
--- a/yt_dlp/utils/_utils.py
+++ b/yt_dlp/utils/_utils.py
@@ -3507,7 +3507,8 @@ def get_compatible_ext(*, vcodecs, acodecs, vexts, aexts, preferences=None):
},
}
- sanitize_codec = functools.partial(try_get, getter=lambda x: x[0].split('.')[0].replace('0', ''))
+ sanitize_codec = functools.partial(
+ try_get, getter=lambda x: x[0].split('.')[0].replace('0', '').lower())
vcodec, acodec = sanitize_codec(vcodecs), sanitize_codec(acodecs)
for ext in preferences or COMPATIBLE_CODECS.keys():
@@ -5737,9 +5738,9 @@ class FormatSorter:
'source': {'convert': 'float', 'field': 'source_preference', 'default': -1},
'codec': {'type': 'combined', 'field': ('vcodec', 'acodec')},
- 'br': {'type': 'multiple', 'field': ('tbr', 'vbr', 'abr'),
+ 'br': {'type': 'multiple', 'field': ('tbr', 'vbr', 'abr'), 'convert': 'float_none',
'function': lambda it: next(filter(None, it), None)},
- 'size': {'type': 'multiple', 'field': ('filesize', 'fs_approx'),
+ 'size': {'type': 'multiple', 'field': ('filesize', 'fs_approx'), 'convert': 'bytes',
'function': lambda it: next(filter(None, it), None)},
'ext': {'type': 'combined', 'field': ('vext', 'aext')},
'res': {'type': 'multiple', 'field': ('height', 'width'),