Skip to content

Commit

Permalink
[YoutubeDL] check annotations availabilty(closes #18582)
Browse files Browse the repository at this point in the history
  • Loading branch information
remitamine committed Aug 9, 2019
1 parent 64b6a4e commit ffddb11
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions youtube_dl/YoutubeDL.py
Original file line number Diff line number Diff line change
Expand Up @@ -1783,6 +1783,8 @@ def ensure_dir_exists(path):
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)
Expand Down

0 comments on commit ffddb11

Please sign in to comment.