1
0
Fork 0
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:
dirkf 2022-11-15 19:04:07 +00:00 committed by GitHub
parent 23fe05b4f7
commit 6b65df9cad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)):
# extractors apart from YoutubeIE can mark: be more lenient
try:
self._mark_watched(*args, **kwargs) 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')