1
0
Fork 0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-12-22 16:57:40 +00:00

[YoutubeDL] Improve thumbnails' filenames deducing (closes #26010) (#27244)

This commit is contained in:
compujo 2020-12-11 15:12:31 -05:00 committed by GitHub
parent 00f5068908
commit 4b9051cf39
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2410,7 +2410,7 @@ class YoutubeDL(object):
thumb_ext = determine_ext(t['url'], 'jpg')
suffix = '_%s' % t['id'] if len(thumbnails) > 1 else ''
thumb_display_id = '%s ' % t['id'] if len(thumbnails) > 1 else ''
t['filename'] = thumb_filename = os.path.splitext(filename)[0] + suffix + '.' + thumb_ext
t['filename'] = thumb_filename = replace_extension(filename + suffix, thumb_ext, info_dict.get('ext'))
if self.params.get('nooverwrites', False) and os.path.exists(encodeFilename(thumb_filename)):
self.to_screen('[%s] %s: Thumbnail %sis already present' %