From 01e224e0dae3ce4f1a85bdb97682cd9e22049077 Mon Sep 17 00:00:00 2001 From: fnord Date: Fri, 17 Jul 2015 02:01:26 -0500 Subject: [PATCH] --custom-meta make %(invalid_key)s blank. This means --custom-meta 'album=%(playlist_title)s' will not have an album tag for media with playlist_title, as opposed to having it set to NA. This is more in line with --add-metadata's behavior --- youtube_dl/postprocessor/ffmpeg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dl/postprocessor/ffmpeg.py b/youtube_dl/postprocessor/ffmpeg.py index 1a3dc47af..e67f14acb 100644 --- a/youtube_dl/postprocessor/ffmpeg.py +++ b/youtube_dl/postprocessor/ffmpeg.py @@ -369,7 +369,7 @@ class FFmpegMetadataPP(FFmpegPostProcessor): for m in self._downloader.params.get('custommeta'): key, val = m.split('=', 1) - metadata[key] = val.replace('\\n', '\n') % collections.defaultdict(lambda: 'NA', info) + metadata[key] = val.replace('\\n', '\n') % collections.defaultdict(lambda: '', info) if not metadata: self._downloader.to_screen('[ffmpeg] There isn\'t any metadata to add')