From de13ccaf20ee8ae8a6c9e98a7b0722b1fca1c1a9 Mon Sep 17 00:00:00 2001 From: mediaminister <45148099+mediaminister@users.noreply.github.com> Date: Sun, 22 Mar 2020 16:43:03 +0000 Subject: [PATCH] Fix broken colors (#700) --- .../resource.language.en_gb/strings.po | 10 +++++----- .../resource.language.nl_nl/strings.po | 20 +++++++++---------- resources/lib/kodiutils.py | 2 +- resources/lib/metadata.py | 6 +++--- resources/lib/search.py | 4 ++-- resources/lib/vrtplayer.py | 4 ++-- 6 files changed, 23 insertions(+), 23 deletions(-) diff --git a/resources/language/resource.language.en_gb/strings.po b/resources/language/resource.language.en_gb/strings.po index f5e037f2..f6187cb2 100644 --- a/resources/language/resource.language.en_gb/strings.po +++ b/resources/language/resource.language.en_gb/strings.po @@ -641,7 +641,7 @@ msgid "Streaming and DRM" msgstr "" msgctxt "#30787" -msgid "Use Widevine DRM [COLOR={greyedout}][I](for protected content)[/I][/COLOR]" +msgid "Use Widevine DRM [COLOR=gray][I](for protected content)[/I][/COLOR]" msgstr "" msgctxt "#30788" @@ -649,7 +649,7 @@ msgid "Most live streams are available in 720p HD-quality, but may require DRM t msgstr "" msgctxt "#30789" -msgid "Maximum bandwidth [COLOR={greyedout}](in kbps)[/COLOR]" +msgid "Maximum bandwidth [COLOR=gray](in kbps)[/COLOR]" msgstr "" msgctxt "#30790" @@ -797,7 +797,7 @@ msgid "InputStream Helper information" msgstr "" msgctxt "#30911" -msgid "InputStream Helper settings… [COLOR={greyedout}][I](for protected content)[/I][/COLOR]" +msgid "InputStream Helper settings… [COLOR=gray][I](for protected content)[/I][/COLOR]" msgstr "" msgctxt "#30913" @@ -833,11 +833,11 @@ msgid "Invalidate local HTTP caches" msgstr "" msgctxt "#30927" -msgid "Direct HTTP cache time-to-live [COLOR={greyedout}](in minutes)[/COLOR]" +msgid "Direct HTTP cache time-to-live [COLOR=gray](in minutes)[/COLOR]" msgstr "" msgctxt "#30929" -msgid "Indirect HTTP cache time-to-live [COLOR={greyedout}](in minutes)[/COLOR]" +msgid "Indirect HTTP cache time-to-live [COLOR=gray](in minutes)[/COLOR]" msgstr "" msgctxt "#30931" diff --git a/resources/language/resource.language.nl_nl/strings.po b/resources/language/resource.language.nl_nl/strings.po index ae13c825..ea6bf6fe 100644 --- a/resources/language/resource.language.nl_nl/strings.po +++ b/resources/language/resource.language.nl_nl/strings.po @@ -641,16 +641,16 @@ msgid "Streaming and DRM" msgstr "Streaming en DRM" msgctxt "#30787" -msgid "Use Widevine DRM [COLOR={greyedout}][I](for protected content)[/I][/COLOR]" -msgstr "Gebruik Widevine DRM [COLOR={greyedout}][I](voor beveiligde video's)[/I][/COLOR]" +msgid "Use Widevine DRM [COLOR=gray][I](for protected content)[/I][/COLOR]" +msgstr "Gebruik Widevine DRM [COLOR=gray][I](voor beveiligde video's)[/I][/COLOR]" msgctxt "#30788" msgid "Most live streams are available in 720p HD-quality, but may require DRM to be enabled." msgstr "De meeste livestreams zijn beschikbaar in 720p HD-kwaliteit, maar hiervoor moet mogelijk DRM worden ingeschakeld." msgctxt "#30789" -msgid "Maximum bandwidth [COLOR={greyedout}](in kbps)[/COLOR]" -msgstr "Maximale bandbreedte [COLOR={greyedout}](in kbps)[/COLOR]" +msgid "Maximum bandwidth [COLOR=gray](in kbps)[/COLOR]" +msgstr "Maximale bandbreedte [COLOR=gray](in kbps)[/COLOR]" msgctxt "#30790" msgid "In case you have limited bandwidth available, you may want to specify a maximum bandwidth so that a lower bitrate stream can be selected for playback." @@ -797,8 +797,8 @@ msgid "InputStream Helper information" msgstr "InputStream Helper informatie" msgctxt "#30911" -msgid "InputStream Helper settings… [COLOR={greyedout}][I](for protected content)[/I][/COLOR]" -msgstr "InputStream Helper instellingen…[COLOR={greyedout}][I](voor beveiligde video's)[/I][/COLOR]" +msgid "InputStream Helper settings… [COLOR=gray][I](for protected content)[/I][/COLOR]" +msgstr "InputStream Helper instellingen…[COLOR=gray][I](voor beveiligde video's)[/I][/COLOR]" msgctxt "#30913" msgid "Cache" @@ -833,12 +833,12 @@ msgid "Invalidate local HTTP caches" msgstr "Maak lokale HTTP caches ongeldig" msgctxt "#30927" -msgid "Direct HTTP cache time-to-live [COLOR={greyedout}](in minutes)[/COLOR]" -msgstr "Directe HTTP cache time-to-live [COLOR={greyedout}](in minuten)[/COLOR]" +msgid "Direct HTTP cache time-to-live [COLOR=gray](in minutes)[/COLOR]" +msgstr "Directe HTTP cache time-to-live [COLOR=gray](in minuten)[/COLOR]" msgctxt "#30929" -msgid "Indirect HTTP cache time-to-live [COLOR={greyedout}](in minutes)[/COLOR]" -msgstr "Indirecte HTTP cache time-to-live [COLOR={greyedout}](in minuten)[/COLOR]" +msgid "Indirect HTTP cache time-to-live [COLOR=gray](in minutes)[/COLOR]" +msgstr "Indirecte HTTP cache time-to-live [COLOR=gray](in minuten)[/COLOR]" msgctxt "#30931" msgid "Logging" diff --git a/resources/lib/kodiutils.py b/resources/lib/kodiutils.py index ab4a9fe9..386c1f24 100644 --- a/resources/lib/kodiutils.py +++ b/resources/lib/kodiutils.py @@ -187,7 +187,7 @@ def show_listing(list_items, category=None, sort='unsorted', ascending=True, con is_folder = bool(not title_item.is_playable and title_item.path) is_playable = bool(title_item.is_playable and title_item.path) - list_item = ListItem(label=colour(title_item.label)) + list_item = ListItem(label=title_item.label) prop_dict = dict( IsInternetStream='true' if is_playable else 'false', diff --git a/resources/lib/metadata.py b/resources/lib/metadata.py index 6a964acf..d2b576ad 100644 --- a/resources/lib/metadata.py +++ b/resources/lib/metadata.py @@ -148,7 +148,7 @@ def get_context_menu(self, api_data, program, cache_file): 'RunPlugin(%s)' % url_for('delete_cache', cache_file=cache_file) )) - return context_menu, favorite_marker, watchlater_marker + return context_menu, colour(favorite_marker), colour(watchlater_marker) @staticmethod def get_asset_id(api_data): @@ -766,9 +766,9 @@ def get_label(api_data, titletype=None, return_sort=False): label = '' if return_sort: - return label, sort, ascending + return colour(label), sort, ascending - return label + return colour(label) @staticmethod def get_tag(api_data): diff --git a/resources/lib/search.py b/resources/lib/search.py index 610b1a52..49d8d197 100644 --- a/resources/lib/search.py +++ b/resources/lib/search.py @@ -5,7 +5,7 @@ from __future__ import absolute_import, division, unicode_literals from favorites import Favorites -from kodiutils import (addon_profile, container_refresh, container_update, end_of_directory, get_json_data, +from kodiutils import (colour, addon_profile, container_refresh, container_update, end_of_directory, get_json_data, get_search_string, get_setting_int, input_down, localize, ok_dialog, open_file, show_listing, ttl, url_for) from resumepoints import ResumePoints @@ -98,7 +98,7 @@ def search(self, keywords=None, page=0, edit=False): from helperobjects import TitleItem if len(search_items) == get_setting_int('itemsperpage', default=50): search_items.append(TitleItem( - label=localize(30300), # More… + label=colour(localize(30300)), # More… path=url_for('search_query', keywords=keywords, page=page + 1), art_dict=dict(thumb='DefaultAddonSearch.png'), info_dict=dict(), diff --git a/resources/lib/vrtplayer.py b/resources/lib/vrtplayer.py index 06fafded..8c9b2d4b 100644 --- a/resources/lib/vrtplayer.py +++ b/resources/lib/vrtplayer.py @@ -6,7 +6,7 @@ from apihelper import ApiHelper from favorites import Favorites from helperobjects import TitleItem -from kodiutils import (delete_cached_thumbnail, end_of_directory, get_addon_info, +from kodiutils import (colour, delete_cached_thumbnail, end_of_directory, get_addon_info, get_setting, get_setting_bool, get_setting_int, has_credentials, localize, log_error, ok_dialog, play, set_setting, show_listing, ttl, url_for, wait_for_resumepoints) @@ -272,7 +272,7 @@ def show_recent_menu(self, page=0, use_favorites=False): else: recent = 'recent' episode_items.append(TitleItem( - label=localize(30300), + label=colour(localize(30300)), path=url_for(recent, page=page + 1), art_dict=dict(thumb='DefaultRecentlyAddedEpisodes.png'), info_dict=dict(),