diff options
author | Philipp Hagemeister <[email protected]> | 2014-06-07 15:39:21 +0200 |
---|---|---|
committer | Philipp Hagemeister <[email protected]> | 2014-06-07 15:39:21 +0200 |
commit | be6d722904f646e1c7f879cd32bfced22abffada (patch) | |
tree | a971a50fbabce32e9a29b3c0ccd15d78f1932175 /youtube_dl/YoutubeDL.py | |
parent | d5519808235997db2189e840bf87c89693a208cc (diff) | |
download | youtube-dl-be6d722904f646e1c7f879cd32bfced22abffada.tar.gz youtube-dl-be6d722904f646e1c7f879cd32bfced22abffada.zip |
[cnn] Improve thumbnail extraction
Diffstat (limited to 'youtube_dl/YoutubeDL.py')
-rwxr-xr-x | youtube_dl/YoutubeDL.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py index 455c0a7b0..dc0ba986a 100755 --- a/youtube_dl/YoutubeDL.py +++ b/youtube_dl/YoutubeDL.py @@ -719,6 +719,8 @@ class YoutubeDL(object): thumbnails = info_dict.get('thumbnails') if thumbnails: + thumbnails.sort(key=lambda t: ( + t.get('width'), t.get('height'), t.get('url'))) for t in thumbnails: if 'width' in t and 'height' in t: t['resolution'] = '%dx%d' % (t['width'], t['height']) |