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