1
0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2025-01-08 18:48:49 +00:00

Corrected a small error

This commit is contained in:
Andrea Lazzaretti 2021-04-13 13:36:49 +02:00
parent 437f1dc159
commit f4aa8c13b5

View File

@ -2428,6 +2428,7 @@ class YoutubeDL(object):
if self.params.get('writethumbnail', False): if self.params.get('writethumbnail', False):
thumbnails = info_dict.get('thumbnails') thumbnails = info_dict.get('thumbnails')
thumbnailformat = self.params.get('thumbnailformat', False) thumbnailformat = self.params.get('thumbnailformat', False)
if thumbnails:
if thumbnailformat: if thumbnailformat:
if thumbnailformat in [i.get('id') for i in thumbnails]: if thumbnailformat in [i.get('id') for i in thumbnails]:
thumbnails = [i for i in thumbnails if i.get('id')==thumbnailformat] thumbnails = [i for i in thumbnails if i.get('id')==thumbnailformat]