aboutsummaryrefslogtreecommitdiffhomepage
path: root/youtube_dl/__init__.py
diff options
context:
space:
mode:
authorYen Chi Hsuan <[email protected]>2015-05-14 02:32:00 +0800
committerYen Chi Hsuan <[email protected]>2015-05-14 02:32:00 +0800
commit8e595397529abc71093264e3695fb00d95be4d78 (patch)
treebc1923c21247240f53adf2de58f13e8e48c62fad /youtube_dl/__init__.py
parent3749e36e9f0e6be2a3a3ab1b15c0c02be5a50e2f (diff)
downloadyoutube-dl-8e595397529abc71093264e3695fb00d95be4d78.tar.gz
youtube-dl-8e595397529abc71093264e3695fb00d95be4d78.zip
[postprocessor/embedthumbnail] Use thumbnails downloaded by YoutubeDL
Diffstat (limited to 'youtube_dl/__init__.py')
-rw-r--r--youtube_dl/__init__.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/youtube_dl/__init__.py b/youtube_dl/__init__.py
index 9cc9f851f..ace17857c 100644
--- a/youtube_dl/__init__.py
+++ b/youtube_dl/__init__.py
@@ -240,7 +240,13 @@ def _real_main(argv=None):
if opts.xattrs:
postprocessors.append({'key': 'XAttrMetadata'})
if opts.embedthumbnail:
- postprocessors.append({'key': 'EmbedThumbnail'})
+ already_have_thumbnail = opts.writethumbnail or opts.write_all_thumbnails
+ postprocessors.append({
+ 'key': 'EmbedThumbnail',
+ 'already_have_thumbnail': already_have_thumbnail
+ })
+ if not already_have_thumbnail:
+ opts.writethumbnail = True
# Please keep ExecAfterDownload towards the bottom as it allows the user to modify the final file in any way.
# So if the user is able to remove the file before your postprocessor runs it might cause a few problems.
if opts.exec_cmd: