[metadatafromtitle] Some improvements and cleanup
* Remove the 'songtitle' field, 'title' can be used instead. * Remove newlines in the help text, for consistency with other options. * Add 'from __future__ import unicode_literals'. * Call '__init__' from the parent class. * Add test for the format_to_regex method
This commit is contained in:
parent
e7db87f700
commit
88cf6fb368
4 changed files with 25 additions and 11 deletions
|
@ -541,9 +541,7 @@ class FFmpegEmbedSubtitlePP(FFmpegPostProcessor):
|
|||
class FFmpegMetadataPP(FFmpegPostProcessor):
|
||||
def run(self, info):
|
||||
metadata = {}
|
||||
if info.get('songtitle') is not None:
|
||||
metadata['title'] = info['songtitle']
|
||||
elif info.get('title') is not None:
|
||||
if info.get('title') is not None:
|
||||
metadata['title'] = info['title']
|
||||
if info.get('upload_date') is not None:
|
||||
metadata['date'] = info['upload_date']
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue