[embedthumbnail] Fix bug where jpeg thumbnails were converted again

Closes #297
pull/310/head
pukkandan 4 years ago
parent f59ae58163
commit 4d224a3022
No known key found for this signature in database
GPG Key ID: 0F00D95A001F4698

@ -59,7 +59,7 @@ class EmbedThumbnailPP(FFmpegPostProcessor):
original_thumbnail = thumbnail_filename = info['thumbnails'][-1]['filepath'] original_thumbnail = thumbnail_filename = info['thumbnails'][-1]['filepath']
# Convert unsupported thumbnail formats to JPEG (see #25687, #25717) # 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'): if thumbnail_ext not in ('jpg', 'png'):
thumbnail_filename = convertor.convert_thumbnail(thumbnail_filename, 'jpg') thumbnail_filename = convertor.convert_thumbnail(thumbnail_filename, 'jpg')
thumbnail_ext = 'jpg' thumbnail_ext = 'jpg'

Loading…
Cancel
Save