[embedthumbnail] Use the imported base64 module from the 'utils'
This commit is contained in:
parent
5e10411546
commit
2715865cd0
@ -14,7 +14,8 @@ from ..utils import (
|
|||||||
encodeFilename,
|
encodeFilename,
|
||||||
PostProcessingError,
|
PostProcessingError,
|
||||||
prepend_extension,
|
prepend_extension,
|
||||||
shell_quote
|
shell_quote,
|
||||||
|
base64
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -96,7 +97,6 @@ class EmbedThumbnailPP(FFmpegPostProcessor):
|
|||||||
from mutagen.oggvorbis import OggVorbis
|
from mutagen.oggvorbis import OggVorbis
|
||||||
from mutagen.oggopus import OggOpus
|
from mutagen.oggopus import OggOpus
|
||||||
from mutagen.flac import Picture, FLAC
|
from mutagen.flac import Picture, FLAC
|
||||||
from base64 import b64encode
|
|
||||||
except ImportError:
|
except ImportError:
|
||||||
raise EmbedThumbnailPPError('mutagen was not found. Please install.')
|
raise EmbedThumbnailPPError('mutagen was not found. Please install.')
|
||||||
|
|
||||||
@ -114,7 +114,7 @@ class EmbedThumbnailPP(FFmpegPostProcessor):
|
|||||||
aufile.add_picture(covart)
|
aufile.add_picture(covart)
|
||||||
else:
|
else:
|
||||||
aufile['metadata_block_picture'] = \
|
aufile['metadata_block_picture'] = \
|
||||||
b64encode(covart.write()).decode('ascii')
|
base64.b64encode(covart.write()).decode('ascii')
|
||||||
|
|
||||||
# Save changes to temporary file, it'd be overlapped as the
|
# Save changes to temporary file, it'd be overlapped as the
|
||||||
# original one.
|
# original one.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user