From 688433d22a6eb8ddd70cf985e81bcdee38d9655c Mon Sep 17 00:00:00 2001 From: Felix Stupp Date: Sun, 6 Nov 2022 15:04:17 +0100 Subject: [PATCH] thumbnail view: Add overlay to unconsidered media - calling functions can define, if overlay or check for considerable is required --- server/app.py | 3 +++ server/templates/collection_element.htm | 1 + server/templates/collection_episodes.htm | 1 + server/templates/dashboard.htm | 3 +++ server/templates/macros.htm | 12 +++++++++++- server/templates/media_list.htm | 1 + server/templates/recommendations_simple.htm | 1 + 7 files changed, 21 insertions(+), 1 deletion(-) diff --git a/server/app.py b/server/app.py index 92ff473..70a6b3a 100644 --- a/server/app.py +++ b/server/app.py @@ -513,6 +513,7 @@ def list_media() -> ResponseReturnValue: return render_template( "media_list.htm", media_list=common.limit_iter(media_list, 100), + check_considered=False, ) @@ -540,6 +541,7 @@ def list_long_media(seconds: int = 10 * 60) -> ResponseReturnValue: return render_template( "media_list.htm", media_list=list(itertools.islice(media_list, 100)), + check_considered=False, ) @@ -572,6 +574,7 @@ def list_unsorted_media() -> ResponseReturnValue: return render_template( "media_list.htm", media_list=media_list, + check_considered=True, ) diff --git a/server/templates/collection_element.htm b/server/templates/collection_element.htm index ce79036..384321e 100644 --- a/server/templates/collection_element.htm +++ b/server/templates/collection_element.htm @@ -112,6 +112,7 @@

Episodes

{{ macros.media_thumbnail_list( links=media_links, + check_considered=True, link_collection=False, ) }} {% endif %} diff --git a/server/templates/collection_episodes.htm b/server/templates/collection_episodes.htm index 19a9b1e..0aa8f70 100644 --- a/server/templates/collection_episodes.htm +++ b/server/templates/collection_episodes.htm @@ -14,6 +14,7 @@

Episodes

{{ macros.media_thumbnail_list( links=media_links, + check_considered=True, link_collection=False, ) }} diff --git a/server/templates/dashboard.htm b/server/templates/dashboard.htm index ca010bb..cd415dc 100644 --- a/server/templates/dashboard.htm +++ b/server/templates/dashboard.htm @@ -14,12 +14,14 @@

Began Videos

{{ macros.media_thumbnail_list( elements=began_videos, + check_considered=True, ) }} {% endif %}

From Pinned Collections

{% if links_from_pinned_collections %} {{ macros.media_thumbnail_list( links=links_from_pinned_collections, + check_considered=False, link_collection=True, ) }} {% else %} @@ -29,6 +31,7 @@

Latest Videos

{{ macros.media_thumbnail_list( elements=media_list, + check_considered=False, ) }} diff --git a/server/templates/macros.htm b/server/templates/macros.htm index 160fecc..40f09d0 100644 --- a/server/templates/macros.htm +++ b/server/templates/macros.htm @@ -134,7 +134,8 @@ z-index: 20; } .thumbnail_view > .overlay.watched, - .thumbnail_view > .overlay.ignored { + .thumbnail_view > .overlay.ignored, + .thumbnail_view > .overlay.not_considered { opacity: 66%; } .thumbnail_view > .overlay.watched { @@ -143,6 +144,9 @@ .thumbnail_view > .overlay.ignored { background-color: rgba(117, 0, 0, 0.7); } + .thumbnail_view > .overlay.not_considered { + background-color: rgba(34, 34, 34, 0.7); + } .thumbnail_view > .button_list { display: inline-flex; flex-wrap: nowrap; @@ -377,6 +381,7 @@ {% macro media_thumbnail_view( element=None, link=None, + check_considered=True, link_collection=True, ) %} {% set element = link.element if link else element %} @@ -409,6 +414,9 @@
@@ -442,6 +450,7 @@ {% macro media_thumbnail_list( elements=None, links=None, + check_considered=True, link_collection=True, ) %} {%- set l = elements or links -%} @@ -451,6 +460,7 @@ {{ media_thumbnail_view( element=o if not links else None, link=o if links else None, + check_considered=False, link_collection=link_collection, ) }} {% endfor %} diff --git a/server/templates/media_list.htm b/server/templates/media_list.htm index 11a8a14..e3860b3 100644 --- a/server/templates/media_list.htm +++ b/server/templates/media_list.htm @@ -12,6 +12,7 @@

{{ title }}

{{ macros.media_thumbnail_list( elements=media_list, + check_considered=check_considered|default(True), ) }} diff --git a/server/templates/recommendations_simple.htm b/server/templates/recommendations_simple.htm index 88e9614..77c709a 100644 --- a/server/templates/recommendations_simple.htm +++ b/server/templates/recommendations_simple.htm @@ -12,6 +12,7 @@

{{ title }}

{{ macros.media_thumbnail_list( elements=media_list, + check_considered=False, ) }}