youtube-dl

Another place where youtube-dl lives on
git clone git://git.oshgnacknak.de/youtube-dl.git
Log | Files | Refs | README | LICENSE

commit 2615fa758422deaaf11049e71f0c183e655c0b76
parent fac2af3c51c92b7f9abc4f229bc9351e8a301b29
Author: Sergey M․ <dstftw@gmail.com>
Date:   Fri, 27 May 2016 01:46:12 +0600

[downloader/f4m] Simply select format when it's the only one

Diffstat:
Myoutube_dl/downloader/f4m.py | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 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]