diff --git a/models/kodi_models.py b/models/kodi_models.py index 1f63548..2742b6f 100644 --- a/models/kodi_models.py +++ b/models/kodi_models.py @@ -851,15 +851,20 @@ def main_menu_items() -> List[ListItem]: # 'Unsort': 5, 'Settings' (both): 7, 'Shoko Menu': 8, 'Search': 9, Experiment: 99} items: List[ListItem] = [] - img = plugin_img_path + '/%s/%s' + # img = plugin_img_path + '/%s/%s' if plugin_addon.getSettingBool('show_favorites'): name = color(plugin_addon.getLocalizedString(30211), plugin_addon.getSetting('color_favorites')) if plugin_addon.getSettingBool('bold_favorites'): name = bold(name) item = ListItem(name, path='plugin://plugin.video.nakamori/favorites') - img_name = 'airing.png' - item.setArt({'fanart': img % ('backgrounds', img_name), 'banners': img % ('banners', img_name), 'poster': img % ('icons', img_name)}) + # img_name = 'airing.png' + item.setArt({ + 'fanart': f'{plugin_img_path}/backgrounds/airing.png', + 'banners': f'{plugin_img_path}/banners/airing.png', + 'poster': f'{plugin_img_path}/icons/airing.png', + 'icon': f'{plugin_img_path}/icons/airing.png' + }) items.append(item) if plugin_addon.getSettingBool('show_recent2'): @@ -867,8 +872,13 @@ def main_menu_items() -> List[ListItem]: if plugin_addon.getSettingBool('bold_recent2'): name = bold(name) item = ListItem(name, path='plugin://plugin.video.nakamori/recent') - img_name = '/airing.png' - item.setArt({'fanart': img % ('backgrounds', img_name), 'banners': img % ('banners', img_name), 'poster': img % ('icons', img_name)}) + # img_name = 'airing.png' + item.setArt({ + 'fanart': f'{plugin_img_path}/backgrounds/airing.png', + 'banners': f'{plugin_img_path}/banners/airing.png', + 'poster': f'{plugin_img_path}/icons/airing.png', + 'icon': f'{plugin_img_path}/icons/airing.png' + }) items.append(item) # TODO airing today @@ -888,8 +898,13 @@ def main_menu_items() -> List[ListItem]: # isfolter else: item = ListItem(name, path='plugin://plugin.video.nakamori/calendar') - img_name = 'calendar.png' - item.setArt({'fanart': img % ('backgrounds', img_name), 'banners': img % ('banners', img_name), 'poster': img % ('icons', img_name)}) + # img_name = 'calendar.png' + item.setArt({ + 'fanart': f'{plugin_img_path}/backgrounds/calendar.png', + 'banners': f'{plugin_img_path}/banners/calendar.png', + 'poster': f'{plugin_img_path}/icons/calendar.png', + 'icon': f'{plugin_img_path}/icons/calendar.png' + }) items.append(item) if plugin_addon.getSettingBool('show_settings'): @@ -897,8 +912,13 @@ def main_menu_items() -> List[ListItem]: if plugin_addon.getSettingBool('bold_settings'): name = bold(name) item = ListItem(name, path='plugin://plugin.video.nakamori/settings') - img_name = 'settings.png' - item.setArt({'fanart': img % ('backgrounds', img_name), 'banners': img % ('banners', img_name), 'poster': img % ('icons', img_name)}) + # img_name = 'settings.png' + item.setArt({ + 'fanart': f'{plugin_img_path}/backgrounds/settings.png', + 'banners': f'{plugin_img_path}/banners/settings.png', + 'poster': f'{plugin_img_path}/icons/settings.png', + 'icon': f'{plugin_img_path}/icons/settings.png' + }) items.append(item) if plugin_addon.getSettingBool('show_shoko'): @@ -906,8 +926,13 @@ def main_menu_items() -> List[ListItem]: if plugin_addon.getSettingBool('bold_shoko'): name = bold(name) item = ListItem(name, path='plugin://plugin.video.nakamori/shoko') - img_name = 'settings.png' - item.setArt({'fanart': img % ('backgrounds', img_name), 'banners': img % ('banners', img_name), 'poster': img % ('icons', img_name)}) + # img_name = 'settings.png' + item.setArt({ + 'fanart': f'{plugin_img_path}/backgrounds/settings.png', + 'banners': f'{plugin_img_path}/banners/settings.png', + 'poster': f'{plugin_img_path}/icons/settings.png', + 'icon': f'{plugin_img_path}/icons/settings.png' + }) items.append(item) if plugin_addon.getSettingBool('show_search'): @@ -915,8 +940,13 @@ def main_menu_items() -> List[ListItem]: if plugin_addon.getSettingBool('bold_search'): name = bold(name) item = ListItem(name, path='plugin://plugin.video.nakamori/search') - img_name = 'search.png' - item.setArt({'fanart': img % ('backgrounds', img_name), 'banners': img % ('banners', img_name), 'poster': img % ('icons', img_name)}) + # img_name = 'search.png' + item.setArt({ + 'fanart': f'{plugin_img_path}/backgrounds/search.png', + 'banners': f'{plugin_img_path}/banners/search.png', + 'poster': f'{plugin_img_path}/icons/search.png', + 'icon': f'{plugin_img_path}/icons/search.png' + }) items.append(item) return items diff --git a/nakamoriplugin.py b/nakamoriplugin.py index 1d98dc3..69010b9 100644 --- a/nakamoriplugin.py +++ b/nakamoriplugin.py @@ -38,7 +38,6 @@ def list_all_filters(): # also let's flag this information in sqlite version, mark pass - kodi_models.set_content('tvshows') kodi_models.set_sorting_method(ThisType.filter) y = kodi_models.list_all_filters() x = kodi_models.main_menu_items() @@ -49,6 +48,27 @@ def list_all_filters(): y.sort(key=itemgetter(3)) for filter_id, f_type, li, label in y: + if label == "Tags": + li.setArt({ + 'fanart': f'{kodi_models.plugin_img_path}/backgrounds/tags.png', + 'banners': f'{kodi_models.plugin_img_path}/banners/tags.png', + 'poster': f'{kodi_models.plugin_img_path}/icons/tags.png', + 'icon': f'{kodi_models.plugin_img_path}/icons/tags.png' + }) + elif label == "Years": + li.setArt({ + 'fanart': f'{kodi_models.plugin_img_path}/backgrounds/years.png', + 'banners': f'{kodi_models.plugin_img_path}/banners/years.png', + 'poster': f'{kodi_models.plugin_img_path}/icons/years.png', + 'icon': f'{kodi_models.plugin_img_path}/icons/years.png' + }) + elif label == "Seasons": + li.setArt({ + 'fanart': f'{kodi_models.plugin_img_path}/backgrounds/seasons.png', + 'banners': f'{kodi_models.plugin_img_path}/banners/seasons.png', + 'poster': f'{kodi_models.plugin_img_path}/icons/seasons.png', + 'icon': f'{kodi_models.plugin_img_path}/icons/seasons.png' + }) if f_type == ThisType.filter: addDirectoryItem(plugin.handle, plugin.url_for(list_groups_by_filter_id, filter_id), li, True, totalItems=y_count) elif f_type == ThisType.filters: diff --git a/resources/media/icons/airing.png b/resources/media/icons/airing.png index cbc4964..391e3ba 100644 Binary files a/resources/media/icons/airing.png and b/resources/media/icons/airing.png differ diff --git a/resources/media/icons/calendar.png b/resources/media/icons/calendar.png index 9ab29a7..6eda013 100644 Binary files a/resources/media/icons/calendar.png and b/resources/media/icons/calendar.png differ diff --git a/resources/media/icons/clear-search.png b/resources/media/icons/clear-search.png index ac3df35..bf0fc09 100644 Binary files a/resources/media/icons/clear-search.png and b/resources/media/icons/clear-search.png differ diff --git a/resources/media/icons/new-search.png b/resources/media/icons/new-search.png index 9fb115d..73a8d79 100644 Binary files a/resources/media/icons/new-search.png and b/resources/media/icons/new-search.png differ diff --git a/resources/media/icons/search.png b/resources/media/icons/search.png index 1c145ca..a8c4782 100644 Binary files a/resources/media/icons/search.png and b/resources/media/icons/search.png differ diff --git a/resources/media/icons/seasons.png b/resources/media/icons/seasons.png index 4c9fc7c..a05edd2 100644 Binary files a/resources/media/icons/seasons.png and b/resources/media/icons/seasons.png differ diff --git a/resources/media/icons/settings.png b/resources/media/icons/settings.png index fe48327..d66d8aa 100644 Binary files a/resources/media/icons/settings.png and b/resources/media/icons/settings.png differ diff --git a/resources/media/icons/tags.png b/resources/media/icons/tags.png index cd6828c..d966877 100644 Binary files a/resources/media/icons/tags.png and b/resources/media/icons/tags.png differ diff --git a/resources/media/icons/unsort.png b/resources/media/icons/unsort.png index 219cb45..2daea1c 100644 Binary files a/resources/media/icons/unsort.png and b/resources/media/icons/unsort.png differ diff --git a/resources/media/icons/years.png b/resources/media/icons/years.png index 9ab29a7..ccba3ef 100644 Binary files a/resources/media/icons/years.png and b/resources/media/icons/years.png differ