diff options
| author | Jaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com> | 2015-03-14 19:55:42 +0100 | 
|---|---|---|
| committer | Jaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com> | 2015-03-14 20:06:33 +0100 | 
| commit | 88cf6fb3685c4e012c9f574cbc5f1836c42fc06d (patch) | |
| tree | 7a2c2e2f1d69c989866cc34563a5a662ac7ef62e /youtube_dl/postprocessor/ffmpeg.py | |
| parent | e7db87f7000143341505cff812d1fa0371ac901e (diff) | |
[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
Diffstat (limited to 'youtube_dl/postprocessor/ffmpeg.py')
| -rw-r--r-- | youtube_dl/postprocessor/ffmpeg.py | 4 | 
1 files changed, 1 insertions, 3 deletions
| diff --git a/youtube_dl/postprocessor/ffmpeg.py b/youtube_dl/postprocessor/ffmpeg.py index a17113cbf..b6f51cfd5 100644 --- a/youtube_dl/postprocessor/ffmpeg.py +++ b/youtube_dl/postprocessor/ffmpeg.py @@ -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'] | 
