aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/postprocessor/embedthumbnail.py
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2021-05-04 22:18:40 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2021-05-04 22:18:40 +0530
commit4d224a30222e0ae08d0ee8904d4f625197dcd45d (patch)
treec3eb2e0af342228c3f3b19be6c9823c245da04ed /yt_dlp/postprocessor/embedthumbnail.py
parentf59ae58163ae801e06f77618b3a87514852b5f7f (diff)
downloadhypervideo-pre-4d224a30222e0ae08d0ee8904d4f625197dcd45d.tar.lz
hypervideo-pre-4d224a30222e0ae08d0ee8904d4f625197dcd45d.tar.xz
hypervideo-pre-4d224a30222e0ae08d0ee8904d4f625197dcd45d.zip
[embedthumbnail] Fix bug where jpeg thumbnails were converted again
Closes #297
Diffstat (limited to 'yt_dlp/postprocessor/embedthumbnail.py')
-rw-r--r--yt_dlp/postprocessor/embedthumbnail.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/yt_dlp/postprocessor/embedthumbnail.py b/yt_dlp/postprocessor/embedthumbnail.py
index 3be698bce..55551e92c 100644
--- a/yt_dlp/postprocessor/embedthumbnail.py
+++ b/yt_dlp/postprocessor/embedthumbnail.py
@@ -59,7 +59,7 @@ class EmbedThumbnailPP(FFmpegPostProcessor):
original_thumbnail = thumbnail_filename = info['thumbnails'][-1]['filepath']
# Convert unsupported thumbnail formats to JPEG (see #25687, #25717)
- _, thumbnail_ext = os.path.splitext(thumbnail_filename)
+ thumbnail_ext = os.path.splitext(thumbnail_filename)[1][1:]
if thumbnail_ext not in ('jpg', 'png'):
thumbnail_filename = convertor.convert_thumbnail(thumbnail_filename, 'jpg')
thumbnail_ext = 'jpg'