From 6e2520431a8108c5cc310d94b60aa47218c87787 Mon Sep 17 00:00:00 2001 From: A Farzat Date: Mon, 6 Oct 2025 13:14:34 +0300 Subject: Add new Flask routes to get subscriptions info --- components/subscriptions/main.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'components') diff --git a/components/subscriptions/main.py b/components/subscriptions/main.py index afd1d54..f9bcf21 100644 --- a/components/subscriptions/main.py +++ b/components/subscriptions/main.py @@ -26,6 +26,9 @@ class Subscription: if len(self.videos) and type(self.videos[0]) != VideoTuple: self.videos = [VideoTuple._make(vid) for vid in self.videos] + def get_new_vids(self) -> List[VideoTuple]: + return [vid for vid in self.videos if vid.published > self.last_viewed] + def fetch(self) -> None: try: rss = parse(self.link) -- cgit v1.2.3-70-g09d2