diff --git a/server/app.py b/server/app.py index ab230b3..f296b83 100644 --- a/server/app.py +++ b/server/app.py @@ -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") diff --git a/server/templates/macros.htm b/server/templates/macros.htm index 7869e12..bbeb0c9 100644 --- a/server/templates/macros.htm +++ b/server/templates/macros.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",