A feature-rich command-line audio/video downloader
[thumbnailsconvertor] Treat `jpeg` as `jpg`
pukkandan15a4fd53d3a3
diff --git a/yt_dlp/postprocessor/embedthumbnail.py b/yt_dlp/postprocessor/embedthumbnail.pyindex 3427b2cb4d..48d4b673d8 100644--- a/yt_dlp/postprocessor/embedthumbnail.py+++ b/yt_dlp/postprocessor/embedthumbnail.py@@ -92,7 +92,7 @@ class EmbedThumbnailPP(FFmpegPostProcessor):# format, there will be some additional data loss.# PNG, on the other hand, is lossless.thumbnail_ext = os.path.splitext(thumbnail_filename)[1][1:]- if thumbnail_ext not in ('jpg', 'png'):+ if thumbnail_ext not in ('jpg', 'jpeg', 'png'):thumbnail_filename = convertor.convert_thumbnail(thumbnail_filename, 'png')thumbnail_ext = 'png'diff --git a/yt_dlp/postprocessor/ffmpeg.py b/yt_dlp/postprocessor/ffmpeg.pyindex 83714358e1..0d5e78f3d3 100644--- a/yt_dlp/postprocessor/ffmpeg.py+++ b/yt_dlp/postprocessor/ffmpeg.py@@ -896,6 +896,8 @@ class FFmpegThumbnailsConvertorPP(FFmpegPostProcessor):_, thumbnail_ext = os.path.splitext(original_thumbnail)if thumbnail_ext:thumbnail_ext = thumbnail_ext[1:].lower()+ if thumbnail_ext == 'jpeg':+ thumbnail_ext = 'jpg'if thumbnail_ext == self.format:self.to_screen('Thumbnail "%s" is already in the requested format' % original_thumbnail)continue