[postprocessor] Don't replace existing value with null metadata parsed from title
authordirkf <fieldhouse@gmx.net>
Mon, 15 Aug 2022 15:45:04 +0000 (16:45 +0100)
committerdirkf <fieldhouse@gmx.net>
Mon, 15 Aug 2022 15:45:04 +0000 (16:45 +0100)
youtube_dl/postprocessor/metadatafromtitle.py

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