From 992c3b862affbe82fe9edec04945de6734c16062 Mon Sep 17 00:00:00 2001 From: Edward Date: Sat, 22 Dec 2018 21:12:07 -0500 Subject: [PATCH] Added --skip-empty-annotations to be used with write annotations. Will not save annotation if none exist in video --- youtube_dl/YoutubeDL.py | 6 +++++- youtube_dl/__init__.py | 1 + youtube_dl/options.py | 4 ++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py index 4493fd0e1..814d3f721 100755 --- a/youtube_dl/YoutubeDL.py +++ b/youtube_dl/YoutubeDL.py @@ -1,3 +1,4 @@ + #!/usr/bin/env python # coding: utf-8 @@ -314,7 +315,8 @@ class YoutubeDL(object): The following options are used by the Youtube extractor: youtube_include_dash_manifest: If True (default), DASH manifests and related data will be downloaded and processed by extractor. - You can reduce network I/O by disabling it if you don't + + You can reduce network I/O by disabling it if you don't care about DASH. """ @@ -1777,6 +1779,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 '