From: Remita Amine Date: Fri, 9 Aug 2019 07:19:41 +0000 (+0100) Subject: [YoutubeDL] check annotations availabilty(closes #18582) X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=ffddb112642ab394ecc11db055a064368eed42f7;p=youtube-dl [YoutubeDL] check annotations availabilty(closes #18582) --- 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)