compat_urlretrieve,
)
from ..utils import (
+ determine_ext,
check_executable,
encodeFilename,
PostProcessingError,
def run(self, info):
filename = info['filepath']
temp_filename = prepend_extension(filename, 'temp')
- temp_thumbnail = prepend_extension(filename, 'thumb')
+ temp_thumbnail = filename + '.' + determine_ext(info['thumbnail'])
if not info.get('thumbnail'):
raise EmbedThumbnailPPError('Thumbnail was not found. Nothing to do.')
compat_urlretrieve(info['thumbnail'], temp_thumbnail)
if info['ext'] == 'mp3':
- options = ['-i', temp_thumbnail, '-c', 'copy', '-map', '0', '-map', '1',
+ options = [
+ '-i', temp_thumbnail, '-c', 'copy', '-map', '0', '-map', '1',
'-metadata:s:v', 'title="Album cover"', '-metadata:s:v', 'comment="Cover (Front)"']
self._downloader.to_screen('[ffmpeg] Adding thumbnail to "%s"' % filename)