From 4d224a30222e0ae08d0ee8904d4f625197dcd45d Mon Sep 17 00:00:00 2001 From: pukkandan Date: Tue, 4 May 2021 22:18:40 +0530 Subject: [PATCH] [embedthumbnail] Fix bug where jpeg thumbnails were converted again Closes #297 --- yt_dlp/postprocessor/embedthumbnail.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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'