A feature-rich command-line audio/video downloader
[postprocessor/embedthumbnail] Encode arguments in calling AtomicParsley
Yen Chi Hsuan2cc6d135479c
diff --git a/youtube_dl/postprocessor/embedthumbnail.py b/youtube_dl/postprocessor/embedthumbnail.pyindex 4e08c2709f..8f825f7859 100644--- a/youtube_dl/postprocessor/embedthumbnail.py+++ b/youtube_dl/postprocessor/embedthumbnail.py@@ -9,6 +9,7 @@ from .ffmpeg import FFmpegPostProcessorfrom ..utils import (check_executable,+ encodeArgument,encodeFilename,PostProcessingError,prepend_extension,@@ -52,7 +53,12 @@ class EmbedThumbnailPP(FFmpegPostProcessor):if not check_executable('AtomicParsley', ['-v']):raise EmbedThumbnailPPError('AtomicParsley was not found. Please install.')- cmd = ['AtomicParsley', filename, '--artwork', thumbnail_filename, '-o', temp_filename]+ cmd = [encodeFilename('AtomicParsley', True),+ encodeFilename(filename, True),+ encodeArgument('--artwork'),+ encodeFilename(thumbnail_filename, True),+ encodeArgument('-o'),+ encodeFilename(temp_filename, True)]self._downloader.to_screen('[atomicparsley] Adding thumbnail to "%s"' % filename)