projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
64b6a4e
)
[YoutubeDL] check annotations availabilty(closes #18582)
author
Remita Amine
<remitamine@gmail.com>
Fri, 9 Aug 2019 07:19:41 +0000
(08:19 +0100)
committer
Remita Amine
<remitamine@gmail.com>
Fri, 9 Aug 2019 07:19:41 +0000
(08:19 +0100)
youtube_dl/YoutubeDL.py
patch
|
blob
|
history
diff --git
a/youtube_dl/YoutubeDL.py
b/youtube_dl/YoutubeDL.py
index 3e832fec29f621db0837c6775deac0721b9211ff..6a44bc7bab8b79c67d5529f58ab455cc5da5c53c 100755
(executable)
--- a/
youtube_dl/YoutubeDL.py
+++ b/
youtube_dl/YoutubeDL.py
@@
-1783,6
+1783,8
@@
class YoutubeDL(object):
annofn = replace_extension(filename, 'annotations.xml', info_dict.get('ext'))
if self.params.get('nooverwrites', False) and os.path.exists(encodeFilename(annofn)):
self.to_screen('[info] Video annotations are already present')
+ elif not info_dict.get('annotations'):
+ self.report_warning('There are no annotations to write.')
else:
try:
self.to_screen('[info] Writing video annotations to: ' + annofn)