]> jfr.im git - yt-dlp.git/commitdiff
[thumbnailsconvertor] Treat `jpeg` as `jpg`
authorpukkandan <redacted>
Fri, 25 Jun 2021 00:06:35 +0000 (05:36 +0530)
committerpukkandan <redacted>
Fri, 25 Jun 2021 00:06:35 +0000 (05:36 +0530)
yt_dlp/postprocessor/embedthumbnail.py
yt_dlp/postprocessor/ffmpeg.py

index 3427b2cb4d53a20da3397d4a0531f69a242c8b94..48d4b673d8052e55f78c599f51d31dc10d729771 100644 (file)
@@ -92,7 +92,7 @@ def run(self, info):
         # 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'
 
index 83714358e1f4fa17eeed37347a8d76006acd7eb2..0d5e78f3d3d17a52e5f950c4ac0f2a20e563187b 100644 (file)
@@ -896,6 +896,8 @@ def run(self, info):
             _, 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