server: Add endpoint for unsorted media

master
Felix Stupp 3 years ago
parent 7b4112b960
commit b41ecfb080
Signed by: zocker
GPG Key ID: 93E1BD26F6B02FB7

@ -264,6 +264,14 @@ def list_short_media(seconds: int = 10*60):
media_list=list(itertools.islice(get_considerable(), 100))
)
@flask_app.route("/media/unsorted")
def list_unsorted_media():
media_list: Iterable[MediaElement] = orm.select(m for m in MediaElement if len(m.collection_links) == 0).order_by(orm.desc(MediaElement.release_date), MediaElement.id)
return render_template(
"media_list.htm",
media_list=media_list,
)
@flask_app.route("/media/extract")
def extract_media():
return render_template("media_extract.htm")

@ -66,6 +66,7 @@
"Home": "/",
"Latest Media": "/media",
"Short Media": "/media/short",
"Unsorted Media": "/media/unsorted",
"All Collections": "/collection",
"Pinned Collections": "/collection/pinned",
"Collections To Watch": "/collection/to_watch",

Loading…
Cancel
Save