projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
473e870
)
[postprocessor/metadatafromtitle] Fix missing optional meta fields (closes #13408)
author
Sergey M․
<dstftw@gmail.com>
Sat, 17 Jun 2017 12:01:27 +0000
(19:01 +0700)
committer
Sergey M․
<dstftw@gmail.com>
Sat, 17 Jun 2017 12:05:10 +0000
(19:05 +0700)
youtube_dl/postprocessor/metadatafromtitle.py
patch
|
blob
|
history
diff --git
a/youtube_dl/postprocessor/metadatafromtitle.py
b/youtube_dl/postprocessor/metadatafromtitle.py
index c73f02447402e74a8eefd52a3c2f72bfd8c919f0..f5c14d974f4b44c9a5c014a536a0b2f72c65b2db 100644
(file)
--- a/
youtube_dl/postprocessor/metadatafromtitle.py
+++ b/
youtube_dl/postprocessor/metadatafromtitle.py
@@
-35,11
+35,14
@@
class MetadataFromTitlePP(PostProcessor):
title = info['title']
match = re.match(self._titleregex, title)
if match is None:
title = info['title']
match = re.match(self._titleregex, title)
if match is None:
- self._downloader.to_screen('[fromtitle] Could not interpret title of video as "%s"' % self._titleformat)
+ self._downloader.to_screen(
+ '[fromtitle] Could not interpret title of video as "%s"'
+ % self._titleformat)
return [], info
for attribute, value in match.groupdict().items():
return [], info
for attribute, value in match.groupdict().items():
- value = match.group(attribute)
info[attribute] = value
info[attribute] = value
- self._downloader.to_screen('[fromtitle] parsed ' + attribute + ': ' + value)
+ self._downloader.to_screen(
+ '[fromtitle] parsed %s: %s'
+ % (attribute, value if value is not None else 'NA'))
return [], info
return [], info