1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-03-09 12:17:25 +08:00

Followed the code-convention of 'youtube-dl'

This commit is contained in:
shin 2019-12-26 13:18:13 +05:30
parent e82a75d7e7
commit 6fb38337d6

View File

@ -63,8 +63,7 @@ class EmbedThumbnailPP(FFmpegPostProcessor):
meta.add(APIC(
data= open(thumbnail_filename, 'rb').read(),
mime= 'image/'+imghdr.what(thumbnail_filename),
type= PictureType.COVER_FRONT
))
type= PictureType.COVER_FRONT))
meta.save() # Save the changes to file, does in-place replacement.
self._downloader.to_screen('[mutagen.id3] Merged Thumbnail into "%s"' % filename)
@ -84,8 +83,7 @@ class EmbedThumbnailPP(FFmpegPostProcessor):
data= open(thumbnail_filename, 'rb').read(),
imageformat= MP4Cover.FORMAT_JPEG if \
imghdr.what(thumbnail_filename) == 'jpeg' \
else MP4Cover.FORMAT_PNG
)]
else MP4Cover.FORMAT_PNG)]
meta.save()
self._downloader.to_screen('[mutagen.mp4] Merged thumbnail to "%s"' % filename)