app: Add endpoint for listing collections with unwatched episodes

master
Felix Stupp 3 years ago
parent 4fbbb71254
commit 1e2a7b2569
Signed by: zocker
GPG Key ID: 93E1BD26F6B02FB7

@ -218,6 +218,10 @@ def list_collection():
def extract_collection():
return render_template("collection_extract.htm")
@flask_app.route("/collection/to_watch")
def list_collections_with_unwatched():
return _list_collections(lambda collection: not collection.ignored and not collection.completed)
@flask_app.route("/collection/pinned")
def list_pinned_collection():
collection_list: Iterable[MediaCollection] = orm.select(c for c in MediaCollection if c.pinned).order_by(orm.desc(MediaCollection.release_date), MediaCollection.title, MediaCollection.id)

@ -67,6 +67,7 @@
"Latest Media": "/media",
"All Collections": "/collection",
"Pinned Collections": "/collection/pinned",
"Collections To Watch": "/collection/to_watch",
"Show Old Variety": "/recommendations/simple/variety",
"BINGE": "/recommendations/simple/binge",
"Stats": "/stats",

Loading…
Cancel
Save