aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/common.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2016-03-01 01:01:33 +0600
committerSergey M․ <dstftw@gmail.com>2016-03-01 01:01:33 +0600
commitd77ab8e255e593d8534bdd47e84c0cc03c4e6efd (patch)
treeff6952244d0777d40a03b84a217ee14866f62964 /youtube_dl/extractor/common.py
parent4b3cd7316cbb95100f7fc4dd03d86e0fd7674996 (diff)
downloadyoutube-dl-d77ab8e255e593d8534bdd47e84c0cc03c4e6efd.tar.xz
Add --mark-watched feature (Closes #5054)
Diffstat (limited to 'youtube_dl/extractor/common.py')
-rw-r--r--youtube_dl/extractor/common.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/youtube_dl/extractor/common.py b/youtube_dl/extractor/common.py
index 3f16b1b9e..a7c700099 100644
--- a/youtube_dl/extractor/common.py
+++ b/youtube_dl/extractor/common.py
@@ -1620,6 +1620,15 @@ class InfoExtractor(object):
def _get_automatic_captions(self, *args, **kwargs):
raise NotImplementedError('This method must be implemented by subclasses')
+ def mark_watched(self, *args, **kwargs):
+ if (self._downloader.params.get('mark_watched', False) and
+ (self._get_login_info()[0] is not None or
+ self._downloader.params.get('cookiefile') is not None)):
+ self._mark_watched(*args, **kwargs)
+
+ def _mark_watched(self, *args, **kwargs):
+ raise NotImplementedError('This method must be implemented by subclasses')
+
class SearchInfoExtractor(InfoExtractor):
"""