mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-23 11:31:29 +01:00
[downloader/f4m] Simply select format when it's the only one
This commit is contained in:
parent
fac2af3c51
commit
2615fa7584
|
@ -319,7 +319,7 @@ def real_download(self, filename, info_dict):
|
|||
doc = compat_etree_fromstring(manifest)
|
||||
formats = [(int(f.attrib.get('bitrate', -1)), f)
|
||||
for f in self._get_unencrypted_media(doc)]
|
||||
if requested_bitrate is None:
|
||||
if requested_bitrate is None or len(formats) == 1:
|
||||
# get the best format
|
||||
formats = sorted(formats, key=lambda f: f[0])
|
||||
rate, media = formats[-1]
|
||||
|
|
Loading…
Reference in New Issue
Block a user