]> jfr.im git - yt-dlp.git/commitdiff
[extractor] Support `--mark-watched` without `_NETRC_MACHINE` (#2939)
authorcoletdev <redacted>
Fri, 4 Mar 2022 07:27:09 +0000 (20:27 +1300)
committerGitHub <redacted>
Fri, 4 Mar 2022 07:27:09 +0000 (23:27 -0800)
Authored by: coletdjnz

yt_dlp/extractor/common.py

index d8bb211370f9707994e09511562f05116102682c..53b21ece65095aa3c744babc4fedc9fe7d6e20e9 100644 (file)
@@ -3678,7 +3678,7 @@ def _get_automatic_captions(self, *args, **kwargs):
     def mark_watched(self, *args, **kwargs):
         if not self.get_param('mark_watched', False):
             return
-        if (self._get_login_info()[0] is not None
+        if (hasattr(self, '_NETRC_MACHINE') and self._get_login_info()[0] is not None
                 or self.get_param('cookiefile')
                 or self.get_param('cookiesfrombrowser')):
             self._mark_watched(*args, **kwargs)