1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-02 01:02:48 +01:00

Don't try to save the thumbnail if it's None

It means the extractor couldn't find it
This commit is contained in:
Jaime Marquínez Ferrándiz 2013-07-12 22:11:59 +02:00
parent cbdbb76665
commit d8269e1dfb

View File

@ -529,7 +529,7 @@ def process_info(self, info_dict):
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 ...' %