mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-08 01:13:15 +00:00
Apply suggestions from code review
This commit is contained in:
parent
698199b0e8
commit
a691696290
|
@ -23,7 +23,6 @@
|
|||
encodeFilename,
|
||||
filter_dict,
|
||||
float_or_none,
|
||||
is_iterable_like,
|
||||
is_outdated_version,
|
||||
orderedSet,
|
||||
prepend_extension,
|
||||
|
@ -742,9 +741,7 @@ def add(meta_list, info_list=None):
|
|||
info[key] for key in [f'{meta_prefix}_'] + list(variadic(info_list or meta_list))
|
||||
if info.get(key) is not None), None)
|
||||
if value not in ('', None):
|
||||
if is_iterable_like(value):
|
||||
value = ', '.join(value)
|
||||
value = str(value)
|
||||
value = ', '.join(map(str, variadic(value)))
|
||||
value = value.replace('\0', '') # nul character cannot be passed in command line
|
||||
metadata['common'].update({meta_f: value for meta_f in variadic(meta_list)})
|
||||
|
||||
|
|
Loading…
Reference in a new issue