--custom-meta: do not carp on invalid %(info_keys)
This commit is contained in:
parent
1db323f913
commit
fdc3791989
@ -4,7 +4,7 @@ import io
|
|||||||
import os
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
import time
|
import time
|
||||||
|
import collections
|
||||||
|
|
||||||
from .common import AudioConversionError, PostProcessor
|
from .common import AudioConversionError, PostProcessor
|
||||||
|
|
||||||
@ -368,8 +368,8 @@ class FFmpegMetadataPP(FFmpegPostProcessor):
|
|||||||
metadata['album'] = info['album']
|
metadata['album'] = info['album']
|
||||||
|
|
||||||
for m in self._downloader.params.get('custommeta'):
|
for m in self._downloader.params.get('custommeta'):
|
||||||
key,val = m.split('=',1)
|
key, val = m.split('=', 1)
|
||||||
metadata[key] = val.replace('\\n', '\n') % info
|
metadata[key] = val.replace('\\n', '\n') % collections.defaultdict(lambda: 'NA', info)
|
||||||
|
|
||||||
if not metadata:
|
if not metadata:
|
||||||
self._downloader.to_screen('[ffmpeg] There isn\'t any metadata to add')
|
self._downloader.to_screen('[ffmpeg] There isn\'t any metadata to add')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user