浏览代码

[postprocessor] Don't replace existing value with null metadata parsed from title

dirkf 3 年之前
父节点
当前提交
e52e8b8111
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      youtube_dl/postprocessor/metadatafromtitle.py

+ 2 - 0
youtube_dl/postprocessor/metadatafromtitle.py

@@ -40,6 +40,8 @@ class MetadataFromTitlePP(PostProcessor):
                 % self._titleformat)
                 % self._titleformat)
             return [], info
             return [], info
         for attribute, value in match.groupdict().items():
         for attribute, value in match.groupdict().items():
+            if value is None:
+                continue
             info[attribute] = value
             info[attribute] = value
             self._downloader.to_screen(
             self._downloader.to_screen(
                 '[fromtitle] parsed %s: %s'
                 '[fromtitle] parsed %s: %s'