aboutsummaryrefslogtreecommitdiffstats
path: root/youtube_dl/downloader/f4m.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2016-05-27 01:46:12 +0600
committerSergey M․ <dstftw@gmail.com>2016-05-27 01:46:12 +0600
commit2615fa758422deaaf11049e71f0c183e655c0b76 (patch)
treed716e96b0c55cb2cbc1d8b1afd407f0c1b3266db /youtube_dl/downloader/f4m.py
parentfac2af3c51c92b7f9abc4f229bc9351e8a301b29 (diff)
downloadyoutube-dl-2615fa758422deaaf11049e71f0c183e655c0b76.zip
youtube-dl-2615fa758422deaaf11049e71f0c183e655c0b76.tar.gz
youtube-dl-2615fa758422deaaf11049e71f0c183e655c0b76.tar.bz2
[downloader/f4m] Simply select format when it's the only one
Diffstat (limited to 'youtube_dl/downloader/f4m.py')
-rw-r--r--youtube_dl/downloader/f4m.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/youtube_dl/downloader/f4m.py b/youtube_dl/downloader/f4m.py
index 314def4..8f88b02 100644
--- a/youtube_dl/downloader/f4m.py
+++ b/youtube_dl/downloader/f4m.py
@@ -319,7 +319,7 @@ class F4mFD(FragmentFD):
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]