rssVideos: Add --seen flag
This commit is contained in:
parent
1948fc0af2
commit
f4c81e346a
|
@ -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",
|
||||
|
|
Loading…
Reference in a new issue