diff options
| author | A Farzat <a@farzat.xyz> | 2025-10-06 13:14:34 +0300 |
|---|---|---|
| committer | A Farzat <a@farzat.xyz> | 2025-10-06 13:14:34 +0300 |
| commit | 6e2520431a8108c5cc310d94b60aa47218c87787 (patch) | |
| tree | e8ac7a7e99dc70a12900a2b4babdccce5d5eac33 /components | |
| parent | 4434445995512c68ac5a0aa6c81450142bb1e100 (diff) | |
| download | csca5028-6e2520431a8108c5cc310d94b60aa47218c87787.tar.gz csca5028-6e2520431a8108c5cc310d94b60aa47218c87787.zip | |
Add new Flask routes to get subscriptions info
Diffstat (limited to 'components')
| -rw-r--r-- | components/subscriptions/main.py | 3 |
1 files changed, 3 insertions, 0 deletions
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) |
