mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-11-16 06:15:46 +00:00
[common] Make mark_watched() more lenient
This commit is contained in:
parent
23fe05b4f7
commit
6b65df9cad
1 changed files with 5 additions and 1 deletions
|
@ -3001,7 +3001,11 @@ class InfoExtractor(object):
|
||||||
if (self._downloader.params.get('mark_watched', False)
|
if (self._downloader.params.get('mark_watched', False)
|
||||||
and (self._get_login_info()[0] is not None
|
and (self._get_login_info()[0] is not None
|
||||||
or self._downloader.params.get('cookiefile') is not None)):
|
or self._downloader.params.get('cookiefile') is not None)):
|
||||||
self._mark_watched(*args, **kwargs)
|
# extractors apart from YoutubeIE can mark: be more lenient
|
||||||
|
try:
|
||||||
|
self._mark_watched(*args, **kwargs)
|
||||||
|
except NotImplementedError:
|
||||||
|
self.report_warning('Marking as watched is not supported')
|
||||||
|
|
||||||
def _mark_watched(self, *args, **kwargs):
|
def _mark_watched(self, *args, **kwargs):
|
||||||
raise NotImplementedError('This method must be implemented by subclasses')
|
raise NotImplementedError('This method must be implemented by subclasses')
|
||||||
|
|
Loading…
Reference in a new issue