aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/YoutubeDL.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2014-06-07 15:39:21 +0200
committerPhilipp Hagemeister <phihag@phihag.de>2014-06-07 15:39:21 +0200
commitbe6d722904f646e1c7f879cd32bfced22abffada (patch)
treea971a50fbabce32e9a29b3c0ccd15d78f1932175 /youtube_dl/YoutubeDL.py
parentd5519808235997db2189e840bf87c89693a208cc (diff)
downloadyoutube-dl-be6d722904f646e1c7f879cd32bfced22abffada.tar.xz
[cnn] Improve thumbnail extraction
Diffstat (limited to 'youtube_dl/YoutubeDL.py')
-rwxr-xr-xyoutube_dl/YoutubeDL.py2
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'])