From e373cd3458b8f710cf5c8bdfc46c3ec0435d9a47 Mon Sep 17 00:00:00 2001 From: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com> Date: Fri, 15 Mar 2024 10:04:23 -0400 Subject: [PATCH] fix(ui): use correct label in progress bar (#378) --- Contents/Code/webapp.py | 1 + Contents/Resources/web/templates/home.html | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/Contents/Code/webapp.py b/Contents/Code/webapp.py index 7b53538c..bf5a03f2 100644 --- a/Contents/Code/webapp.py +++ b/Contents/Code/webapp.py @@ -247,6 +247,7 @@ def cache_data(): len(collections_with_themes) / len(collections) * 100) if len(collections_with_themes) else 0, collections_enabled=Prefs['bool_auto_update_collection_themes'], total_count=len(all_items), + type=section.type, ) for item in all_items: diff --git a/Contents/Resources/web/templates/home.html b/Contents/Resources/web/templates/home.html index 379876db..9ee3b49a 100644 --- a/Contents/Resources/web/templates/home.html +++ b/Contents/Resources/web/templates/home.html @@ -31,8 +31,19 @@

- {% set library_type = _('Games') if items[section]['agent'] == 'dev.lizardbyte.retroarcher-plex' - else _('Movies') %} + {% if items[section]['agent'] == 'dev.lizardbyte.retroarcher-plex' %} + {% set library_type = _('Games') %} + {% elif items[section]['type'] == 'movie' %} + {% set library_type = _('Movies') %} + {% elif items[section]['type'] == 'show' %} + {% set library_type = _('Shows') %} + {% elif items[section]['type'] == 'artist' %} + {% set library_type = _('Artists') %} + {% elif items[section]['type'] == 'photo' %} + {% set library_type = _('Photos') %} + {% else %} + {% set library_type = _('Items') %} + {% endif %} {% if items[section]['media_percent_complete'] == 100 %} {% set progress_bar_color = 'bg-success' %} {% elif items[section]['media_percent_complete'] > 50 %}