From f4c81e346a0182d21fde04cfc52613ebccdf959e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Geoffrey=20=E2=80=9CFrogeye=E2=80=9D=20Preud=27homme?= Date: Sat, 18 Dec 2021 22:23:48 +0100 Subject: [PATCH] rssVideos: Add --seen flag --- config/scripts/rssVideos | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/config/scripts/rssVideos b/config/scripts/rssVideos index 71ba5a6..ad5943f 100755 --- a/config/scripts/rssVideos +++ b/config/scripts/rssVideos @@ -194,8 +194,8 @@ class RVElement: } def matches_filter(self, args: configargparse.Namespace) -> bool: - if self.watched: - log.debug(f"Already watched: {self}") + if args.seen != "any" and (args.seen == "seen") != self.watched: + log.debug(f"Not {args.seen}: {self}") return False if args.title and not re.search(args.title, self.title): log.debug(f"Title not matching {args.title}: {self}") @@ -447,6 +447,7 @@ def get_args() -> configargparse.Namespace: parser.add("--title", help="Regex to filter by title") parser.add("--link", help="Regex to filter by link") parser.add("--duration", help="Comparative to filter by duration") + parser.add("--seen", choices=("seen","unseen","any"), default="unseen", help="Only include seen/unseen/any videos") # TODO Envrionment variables parser.add( "--max-duration",