youtube-dl

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

commit bf8dd790456acc4a96d2961e61e96c4771e4d787
parent c6781156aa023c1131db6c5b1f575e1833649b33
Author: Sergey M․ <dstftw@gmail.com>
Date:   Sun, 26 Jun 2016 21:09:07 +0700

[extractor/common] Fix sorting with custom field preference

Diffstat:
Myoutube_dl/extractor/common.py | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/youtube_dl/extractor/common.py b/youtube_dl/extractor/common.py @@ -878,7 +878,11 @@ class InfoExtractor(object): f['ext'] = determine_ext(f['url']) if isinstance(field_preference, (list, tuple)): - return tuple(f.get(field) if f.get(field) is not None else -1 for field in field_preference) + return tuple( + f.get(field) + if f.get(field) is not None + else ('' if field == 'format_id' else -1) + for field in field_preference) preference = f.get('preference') if preference is None: