1
0
mirror of https://codeberg.org/polarisfm/youtube-dl synced 2024-11-22 08:34:32 +01:00

[__init__] Metadata should be added after conversion

Fixes #5594
This commit is contained in:
Yen Chi Hsuan 2017-01-09 02:36:39 +08:00
parent 92cb5763f4
commit 54a3a8827b
No known key found for this signature in database
GPG Key ID: 7F902A182457CA23
2 changed files with 9 additions and 3 deletions

View File

@ -1,5 +1,9 @@
version <unreleased> version <unreleased>
Core
* [__init__] Metadata are now added after conversion (#5594)
Extractors Extractors
* [openload] Fix extraction (#10408, #12357) * [openload] Fix extraction (#10408, #12357)

View File

@ -242,14 +242,11 @@ def _real_main(argv=None):
# PostProcessors # PostProcessors
postprocessors = [] postprocessors = []
# Add the metadata pp first, the other pps will copy it
if opts.metafromtitle: if opts.metafromtitle:
postprocessors.append({ postprocessors.append({
'key': 'MetadataFromTitle', 'key': 'MetadataFromTitle',
'titleformat': opts.metafromtitle 'titleformat': opts.metafromtitle
}) })
if opts.addmetadata:
postprocessors.append({'key': 'FFmpegMetadata'})
if opts.extractaudio: if opts.extractaudio:
postprocessors.append({ postprocessors.append({
'key': 'FFmpegExtractAudio', 'key': 'FFmpegExtractAudio',
@ -279,6 +276,11 @@ def _real_main(argv=None):
}) })
if not already_have_thumbnail: if not already_have_thumbnail:
opts.writethumbnail = True opts.writethumbnail = True
# FFmpegMetadataPP should be run after FFmpegVideoConvertorPP and
# FFmpegExtractAudioPP as containers before conversion may not support
# metadata (3gp, webm, etc.)
if opts.addmetadata:
postprocessors.append({'key': 'FFmpegMetadata'})
# XAttrMetadataPP should be run after post-processors that may change file # XAttrMetadataPP should be run after post-processors that may change file
# contents # contents
if opts.xattrs: if opts.xattrs: