aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorYen Chi Hsuan <yan12125@gmail.com>2016-10-02 02:12:14 +0800
committerYen Chi Hsuan <yan12125@gmail.com>2016-10-02 02:12:14 +0800
commitb19e275d99c8dfe121ba0dc3478e4eb9c83e4f9b (patch)
tree88b53b5731e14426ba39fccf2bb5b95220176cbd /youtube_dl
parentf6ba581f89fc764e4eaf3045ff5b63e27ad66cbf (diff)
[__init__] Fix lost xattr if --embed-thumbnail used
Reported at https://github.com/rg3/youtube-dl/issues/9054#issuecomment-250451823
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/__init__.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/youtube_dl/__init__.py b/youtube_dl/__init__.py
index 72141b983..f84b866df 100644
--- a/youtube_dl/__init__.py
+++ b/youtube_dl/__init__.py
@@ -266,8 +266,6 @@ def _real_main(argv=None):
postprocessors.append({
'key': 'FFmpegEmbedSubtitle',
})
- if opts.xattrs:
- postprocessors.append({'key': 'XAttrMetadata'})
if opts.embedthumbnail:
already_have_thumbnail = opts.writethumbnail or opts.write_all_thumbnails
postprocessors.append({
@@ -276,6 +274,10 @@ def _real_main(argv=None):
})
if not already_have_thumbnail:
opts.writethumbnail = True
+ # XAttrMetadataPP should be run after post-processors that may change file
+ # contents
+ if opts.xattrs:
+ postprocessors.append({'key': 'XAttrMetadata'})
# 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: