aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/YoutubeDL.py
diff options
context:
space:
mode:
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2013-07-12 22:11:59 +0200
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2013-07-12 22:11:59 +0200
commitd8269e1dfbe06d4b373211e54476bcd326f69abe (patch)
treef97d640c6834bac79b22fad5a5dcbc60a6f20711 /youtube_dl/YoutubeDL.py
parentcbdbb7666540ba07ab7e4a3a7bc34759bf0ca6d9 (diff)
downloadyoutube-dl-d8269e1dfbe06d4b373211e54476bcd326f69abe.tar.xz
Don't try to save the thumbnail if it's None
It means the extractor couldn't find it
Diffstat (limited to 'youtube_dl/YoutubeDL.py')
-rw-r--r--youtube_dl/YoutubeDL.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py
index cc5f76157..c76f1118e 100644
--- a/youtube_dl/YoutubeDL.py
+++ b/youtube_dl/YoutubeDL.py
@@ -529,7 +529,7 @@ class YoutubeDL(object):
return
if self.params.get('writethumbnail', False):
- if 'thumbnail' in info_dict:
+ if info_dict.get('thumbnail') is not None:
thumb_format = determine_ext(info_dict['thumbnail'], u'jpg')
thumb_filename = filename.rpartition('.')[0] + u'.' + thumb_format
self.to_screen(u'[%s] %s: Downloading thumbnail ...' %