mirror of
				https://github.com/yt-dlp/yt-dlp.git
				synced 2025-10-31 06:35:12 +00:00 
			
		
		
		
	[thumbnailsconvertor] Treat jpeg as jpg
				
					
				
			This commit is contained in:
		| @@ -92,7 +92,7 @@ class EmbedThumbnailPP(FFmpegPostProcessor): | |||||||
|         # format, there will be some additional data loss. |         # format, there will be some additional data loss. | ||||||
|         # PNG, on the other hand, is lossless. |         # PNG, on the other hand, is lossless. | ||||||
|         thumbnail_ext = os.path.splitext(thumbnail_filename)[1][1:] |         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_filename = convertor.convert_thumbnail(thumbnail_filename, 'png') | ||||||
|             thumbnail_ext = 'png' |             thumbnail_ext = 'png' | ||||||
|  |  | ||||||
|   | |||||||
| @@ -896,6 +896,8 @@ class FFmpegThumbnailsConvertorPP(FFmpegPostProcessor): | |||||||
|             _, thumbnail_ext = os.path.splitext(original_thumbnail) |             _, thumbnail_ext = os.path.splitext(original_thumbnail) | ||||||
|             if thumbnail_ext: |             if thumbnail_ext: | ||||||
|                 thumbnail_ext = thumbnail_ext[1:].lower() |                 thumbnail_ext = thumbnail_ext[1:].lower() | ||||||
|  |             if thumbnail_ext == 'jpeg': | ||||||
|  |                 thumbnail_ext = 'jpg' | ||||||
|             if thumbnail_ext == self.format: |             if thumbnail_ext == self.format: | ||||||
|                 self.to_screen('Thumbnail "%s" is already in the requested format' % original_thumbnail) |                 self.to_screen('Thumbnail "%s" is already in the requested format' % original_thumbnail) | ||||||
|                 continue |                 continue | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 pukkandan
					pukkandan