aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/YoutubeDL.py
diff options
context:
space:
mode:
authorRemita Amine <remitamine@gmail.com>2019-08-09 08:19:41 +0100
committerRemita Amine <remitamine@gmail.com>2019-08-09 08:19:41 +0100
commitffddb112642ab394ecc11db055a064368eed42f7 (patch)
treedb95e20838e6c3d6031530fddd58d1e2e97093d9 /youtube_dl/YoutubeDL.py
parent64b6a4e91ef735c8d07e93c4e670a01bcb10e7bb (diff)
[YoutubeDL] check annotations availabilty(closes #18582)
Diffstat (limited to 'youtube_dl/YoutubeDL.py')
-rwxr-xr-xyoutube_dl/YoutubeDL.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py
index 3e832fec2..6a44bc7ba 100755
--- 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)