summary refs log tree commit diff
diff options
context:
space:
mode:
authorcompujo <2576634+compujo@users.noreply.github.com>2020-12-11 15:12:31 -0500
committerGitHub <noreply@github.com>2020-12-12 03:12:31 +0700
commit4b9051cf39e5f967b0826871bb30b36889ca65fa (patch)
tree674e19292c363ee7133395f6946027aeaa667827
parent00f5068908eda869d6d4250902905ca381b9bd28 (diff)
downloadyoutube-dl-4b9051cf39e5f967b0826871bb30b36889ca65fa.tar.gz
youtube-dl-4b9051cf39e5f967b0826871bb30b36889ca65fa.tar.xz
youtube-dl-4b9051cf39e5f967b0826871bb30b36889ca65fa.zip
[YoutubeDL] Improve thumbnails' filenames deducing (closes #26010) (#27244)
-rwxr-xr-xyoutube_dl/YoutubeDL.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py
index fdd68f616..6f477bc32 100755
--- a/youtube_dl/YoutubeDL.py
+++ b/youtube_dl/YoutubeDL.py
@@ -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' %