From 1813a6ccd4928f81ca5f4c0144c0008f404d67dd Mon Sep 17 00:00:00 2001 From: pukkandan Date: Fri, 24 Sep 2021 02:16:03 +0530 Subject: [PATCH] [youtube] Fix `--mark-watched` with `--cookies-from-browser` Closes #1019 --- yt_dlp/extractor/common.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/yt_dlp/extractor/common.py b/yt_dlp/extractor/common.py index ae03c1bab..4797e8e2d 100644 --- a/yt_dlp/extractor/common.py +++ b/yt_dlp/extractor/common.py @@ -3503,9 +3503,11 @@ class InfoExtractor(object): raise NotImplementedError('This method must be implemented by subclasses') def mark_watched(self, *args, **kwargs): - if (self.get_param('mark_watched', False) - and (self._get_login_info()[0] is not None - or self.get_param('cookiefile') is not None)): + if not self.get_param('mark_watched', False): + return + if (self._get_login_info()[0] is not None + or self.get_param('cookiefile') + or self.get_param('cookiesfrombrowser')): self._mark_watched(*args, **kwargs) def _mark_watched(self, *args, **kwargs):