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",