diff --git a/api/common/__init__.py b/api/common/__init__.py index 57ed8e3..dbfe3e3 100644 --- a/api/common/__init__.py +++ b/api/common/__init__.py @@ -117,7 +117,6 @@ def call(self, url = f"{self.proto}://{self.address}:{self.port}{url}?api-version={self.version}" else: url = f"{self.proto}://{self.address}:{self.port}{url}" # ?api-version={self.version}" - debug(f"api.call = {url}") headers = { 'Accept': '*/*', @@ -137,11 +136,9 @@ def call(self, # Api Calls req = None if call_type == APIType.GET: - print(f"Api.GET === {url} -- -H {headers} -D {data}") req = Request(url, data=data, headers=headers, method="GET") elif call_type == APIType.POST: - print(f"Api.POST === {url} -- -H {headers} -D {data}") if type(data) is dict: data = json.dumps(data).encode("utf-8") else: @@ -150,21 +147,24 @@ def call(self, req = Request(url, data=data, headers=headers, method="POST") elif call_type == APIType.DELETE: - print(f"Api.DELETE === {url} -- -H {headers} -D {data}") data = json.dumps(data).encode("utf-8") req = Request(url, data=data, headers=headers, method="DELETE") elif call_type == APIType.PATCH: - print(f"Api.PATCH === {url} -- -H {headers} -D {data}") data = json.dumps(data).encode("utf-8") req = Request(url, data=data, headers=headers, method="PATCH") elif call_type == APIType.PUT: - print(f"Api.PUT == {url} -- -H {headers} -D {data}") data = json.dumps(data).encode("utf-8") req = Request(url, data=data, headers=headers, method="PUT") else: print(f"Unknown === {url}") + debug(f"Unknown === {url}") + + print(f"Sending HTTP request: {req.method} {req.get_full_url()}\r\nHeaders: {req.headers}\r\nData: {req.data}") + debug(f"Sending HTTP request: {req.method} {req.get_full_url()}") + debug(f"\t\tHeaders: {req.headers}") + debug(f"\t\tData: {req.data}") if req is not None: if self.try_cache and req.method == 'GET': diff --git a/lib/naka_utils.py b/lib/naka_utils.py index cb29904..5500192 100644 --- a/lib/naka_utils.py +++ b/lib/naka_utils.py @@ -4,8 +4,8 @@ class ThisType(IntEnum): - filters = 0 - filter = 1 + filters = 0 # "Seasons" or "Tags" has additional filters inside. Multinode filter + filter = 1 # "All", "Continue Watching", "Missing episodes", "Recently watched"... Single node filter group = 2 series = 3 # episodes type diff --git a/models/kodi_models.py b/models/kodi_models.py index 1f63548..6152e62 100644 --- a/models/kodi_models.py +++ b/models/kodi_models.py @@ -97,7 +97,7 @@ def get_listitem_from_serie(x: api2models.Serie, forced_title: str = None) -> Li if x.art is not None: set_art(li, x.art) set_folder(li, True) - set_unieque_ids(li, x.aid) + set_unique_ids(li, x.aid) rating = x.rating if x.rating is not None else 0 votes = int(x.votes) if x.votes is not None else 0 set_rating(li, rate_type='anidb', rate_value=float(rating), votes=int(votes), default=True) @@ -162,7 +162,7 @@ def get_listitem_from_episode(x: api2models.Episode, series_title: str = '', cas if x.art is not None: set_art(li, spoiler_control_images(x.art, hide_spoiler)) set_folder(li, False) - set_unieque_ids(li, x.aid) + set_unique_ids(li, x.aid) # set_rating(li, rate_type='anidb', rate_value=float(x.rating), votes=int(x.votes), default=True) #add_season(li, season_name='__season__', season_number=1) set_info_for_episode(li, x, series_title) @@ -501,7 +501,7 @@ def set_folder(li: ListItem, is_folder: bool = True): li.setIsFolder(is_folder) -def set_unieque_ids(li: ListItem, anidb_id=None): +def set_unique_ids(li: ListItem, anidb_id=None): if anidb_id is not None: li.setUniqueIDs({'anidb': anidb_id}) @@ -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..abfdaea 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: @@ -487,10 +507,31 @@ def show_shoko(): # - Update all mediainfo (item) apiv3.update_all_mediainfo # - Update series stats (item) apiv3.update_series_stats - kodi_models.set_content('tvshows') + # kodi_models.set_content('tvshows') # set category to '.. / Shoko' kodi_models.set_category(plugin_addon.getLocalizedString(30115)) + list_item_art = { + 'poster': f'{kodi_models.plugin_img_path}/icons/command.png', + 'icon': f'{kodi_models.plugin_img_path}/icons/command.png' + } + + avdump_mismatched_files_li = xbmcgui.ListItem(label=plugin_addon.getLocalizedString(30373)) + avdump_mismatched_files_li.setArt(list_item_art) + avdump_mismatched_files_li.setInfo(type="video", infoLabels={"plot": plugin_addon.getLocalizedString(30394)}) # setting 'description' + recreate_all_groups_li = xbmcgui.ListItem(label=plugin_addon.getLocalizedString(30374)) + recreate_all_groups_li.setArt(list_item_art) + recreate_all_groups_li.setInfo(type="video", infoLabels={"plot": plugin_addon.getLocalizedString(30395)}) # setting 'description' + sync_hashes_li = xbmcgui.ListItem(label=plugin_addon.getLocalizedString(30375)) + sync_hashes_li.setArt(list_item_art) + sync_hashes_li.setInfo(type="video", infoLabels={"plot": ""}) # setting 'description' + update_all_mediainfo_li = xbmcgui.ListItem(label=plugin_addon.getLocalizedString(30376)) + update_all_mediainfo_li.setArt(list_item_art) + update_all_mediainfo_li.setInfo(type="video", infoLabels={"plot": plugin_addon.getLocalizedString(30396)}) # setting 'description' + update_series_stats_li = xbmcgui.ListItem(label=plugin_addon.getLocalizedString(30377)) + update_series_stats_li.setArt(list_item_art) + update_series_stats_li.setInfo(type="video", infoLabels={"plot": plugin_addon.getLocalizedString(30397)}) # setting 'description' + directory_items = [ # AniDB (url, ListItem, isFolder) (plugin.url_for(show_shoko_anidb_directory), ListItem(label=plugin_addon.getLocalizedString(30367)), True), @@ -505,15 +546,15 @@ def show_shoko(): # Trakt (url, ListItem, isFolder) (plugin.url_for(show_shoko_trakt_directory), ListItem(label=plugin_addon.getLocalizedString(30372)), True), # AVDump mismatched files (url, ListItem, isFolder) - (plugin.url_for(shoko_avdump_mismatched_files), ListItem(label=plugin_addon.getLocalizedString(30373)), False), + (plugin.url_for(shoko_avdump_mismatched_files), avdump_mismatched_files_li, False), # Recreate all groups (url, ListItem, isFolder) - (plugin.url_for(shoko_recreate_all_groups), ListItem(label=plugin_addon.getLocalizedString(30374)), False), + (plugin.url_for(shoko_recreate_all_groups), recreate_all_groups_li, False), # Sync hashes (url, ListItem, isFolder) - (plugin.url_for(shoko_sync_hashes), ListItem(label=plugin_addon.getLocalizedString(30375)), False), + (plugin.url_for(shoko_sync_hashes), sync_hashes_li, False), # Update all mediainfo (url, ListItem, isFolder) - (plugin.url_for(shoko_update_all_mediainfo), ListItem(label=plugin_addon.getLocalizedString(30376)), False), + (plugin.url_for(shoko_update_all_mediainfo), update_all_mediainfo_li, False), # Update series stats (url, ListItem, isFolder) - (plugin.url_for(shoko_update_series_stats), ListItem(label=plugin_addon.getLocalizedString(30377)), False) + (plugin.url_for(shoko_update_series_stats), update_series_stats_li, False) ] # add folders and items to 'Shoko' directory addDirectoryItems(handle=plugin.handle, items=directory_items, totalItems=directory_items.__len__()) @@ -606,19 +647,37 @@ def show_shoko_anidb_directory(): # - Sync "My List" (item) # - Update all info (item) - kodi_models.set_content('tvshows') + # kodi_models.set_content('tvshows') # set category to ' .. / Shoko / AniDB' kodi_models.set_category(f'{plugin_addon.getLocalizedString(30115)} / {plugin_addon.getLocalizedString(30367)}') + list_item_art = { + 'poster': f'{kodi_models.plugin_img_path}/icons/command.png', + 'icon': f'{kodi_models.plugin_img_path}/icons/command.png' + } + + download_missing_data_li = xbmcgui.ListItem(label=plugin_addon.getLocalizedString(30378)) + download_missing_data_li.setArt(list_item_art) + download_missing_data_li.setInfo(type="video", infoLabels={"plot": plugin_addon.getLocalizedString(30398)}) # setting 'description' + sync_votes_li = xbmcgui.ListItem(label=plugin_addon.getLocalizedString(30379)) + sync_votes_li.setArt(list_item_art) + sync_votes_li.setInfo(type="video", infoLabels={"plot": plugin_addon.getLocalizedString(30399)}) # setting 'description' + sync_my_list_li = xbmcgui.ListItem(label=plugin_addon.getLocalizedString(30380)) + sync_my_list_li.setArt(list_item_art) + sync_my_list_li.setInfo(type="video", infoLabels={"plot": plugin_addon.getLocalizedString(30400)}) # setting 'description' + update_all_info_li = xbmcgui.ListItem(label=plugin_addon.getLocalizedString(30381)) + update_all_info_li.setArt(list_item_art) + update_all_info_li.setInfo(type="video", infoLabels={"plot": plugin_addon.getLocalizedString(30401)}) # setting 'description' + directory_items = [ # Download missing data (url, ListItem, isFolder) - (plugin.url_for(anidb_download_missing_data), ListItem(label=plugin_addon.getLocalizedString(30378)), False), + (plugin.url_for(anidb_download_missing_data), download_missing_data_li, False), # Sync votes (url, ListItem, isFolder) - (plugin.url_for(anidb_sync_votes), ListItem(label=plugin_addon.getLocalizedString(30379)), False), + (plugin.url_for(anidb_sync_votes), sync_votes_li, False), # Sync "My List" (url, ListItem, isFolder) - (plugin.url_for(anidb_sync_my_list), ListItem(label=plugin_addon.getLocalizedString(30380)), False), + (plugin.url_for(anidb_sync_my_list), sync_my_list_li, False), # Update all info (url, ListItem, isFolder) - (plugin.url_for(anidb_update_all_info), ListItem(label=plugin_addon.getLocalizedString(30381)), False) + (plugin.url_for(anidb_update_all_info), update_all_info_li, False) ] # add items to 'AniDB' directory addDirectoryItems(handle=plugin.handle, items=directory_items, totalItems=directory_items.__len__()) @@ -669,18 +728,32 @@ def show_shoko_import_folders_directory(): # - Run import (item) # - (User import folders) (Folders) - kodi_models.set_content('tvshows') + # kodi_models.set_content('tvshows') # set category to ' .. / Shoko / Import folders' kodi_models.set_category(f'{plugin_addon.getLocalizedString(30115)} / {plugin_addon.getLocalizedString(30368)}') + list_item_art = { + 'poster': f'{kodi_models.plugin_img_path}/icons/command.png', + 'icon': f'{kodi_models.plugin_img_path}/icons/command.png' + } + + remove_missing_files_li = xbmcgui.ListItem(label=plugin_addon.getLocalizedString(30382)) + remove_missing_files_li.setArt(list_item_art) + remove_missing_files_li.setInfo(type="video", infoLabels={"plot": plugin_addon.getLocalizedString(30402)}) # setting 'description' + remove_missing_files_keep_li = xbmcgui.ListItem(label=plugin_addon.getLocalizedString(30383)) + remove_missing_files_keep_li.setArt(list_item_art) + remove_missing_files_keep_li.setInfo(type="video", infoLabels={"plot": plugin_addon.getLocalizedString(30403)}) # setting 'description' + run_import_li = xbmcgui.ListItem(label=plugin_addon.getLocalizedString(30384)) + run_import_li.setArt(list_item_art) + run_import_li.setInfo(type="video", infoLabels={"plot": plugin_addon.getLocalizedString(30404)}) # setting 'description' directory_items = [ # Remove missing files (url, ListItem, isFolder) - (plugin.url_for(import_folder_remove_missing_files), ListItem(label=plugin_addon.getLocalizedString(30382)), False), + (plugin.url_for(import_folder_remove_missing_files), remove_missing_files_li, False), # Remove missing files (keep in "My List") (url, ListItem, isFolder) - (plugin.url_for(import_folder_remove_missing_files_keep), ListItem(label=plugin_addon.getLocalizedString(30383)), False), + (plugin.url_for(import_folder_remove_missing_files_keep), remove_missing_files_keep_li, False), # Run import (url, ListItem, isFolder) - (plugin.url_for(import_folder_run_import_all), ListItem(label=plugin_addon.getLocalizedString(30384)), False) + (plugin.url_for(import_folder_run_import_all), run_import_li, False) ] # get list items of import folders @@ -723,13 +796,21 @@ def show_shoko_user_import_folder_directory(folder_name, folder_id): # Import folder (folder) # - Rescan folder (item) - kodi_models.set_content('tvshows') + # kodi_models.set_content('tvshows') # set category to ' .. / Shoko / Import folders / folder_name' kodi_models.set_category(f'{plugin_addon.getLocalizedString(30115)} / {plugin_addon.getLocalizedString(30368)} / {folder_name}') + list_item_art = { + 'poster': f'{kodi_models.plugin_img_path}/icons/command.png', + 'icon': f'{kodi_models.plugin_img_path}/icons/command.png' + } + + rescan_folder_li = xbmcgui.ListItem(label=plugin_addon.getLocalizedString(30393)) + rescan_folder_li.setArt(list_item_art) + directory_items = [ # Rescan folder (url, ListItem, isFolder) - (plugin.url_for(user_import_folder_rescan, folder_name, folder_id), ListItem(label=plugin_addon.getLocalizedString(30393)), False), + (plugin.url_for(user_import_folder_rescan, folder_name, folder_id), rescan_folder_li, False), ] # add items to this user's import folder directory @@ -752,15 +833,27 @@ def show_shoko_tvdb_directory(): # - Regenerate links (item) # - Update all info (item) - kodi_models.set_content('tvshows') + # kodi_models.set_content('tvshows') # set category to ' .. / Shoko / TvDB' kodi_models.set_category(f'{plugin_addon.getLocalizedString(30115)} / {plugin_addon.getLocalizedString(30369)}') + list_item_art = { + 'poster': f'{kodi_models.plugin_img_path}/icons/command.png', + 'icon': f'{kodi_models.plugin_img_path}/icons/command.png' + } + + regenerate_links_li = xbmcgui.ListItem(label=plugin_addon.getLocalizedString(30385)) + regenerate_links_li.setArt(list_item_art) + regenerate_links_li.setInfo(type="video", infoLabels={"plot": plugin_addon.getLocalizedString(30405)}) # setting 'description' + update_all_info_li = xbmcgui.ListItem(label=plugin_addon.getLocalizedString(30386)) + update_all_info_li.setArt(list_item_art) + update_all_info_li.setInfo(type="video", infoLabels={"plot": plugin_addon.getLocalizedString(30406)}) # setting 'description' + directory_items = [ # Regenerate links (url, ListItem, isFolder) - (plugin.url_for(tvdb_regenerate_links), ListItem(label=plugin_addon.getLocalizedString(30385)), False), + (plugin.url_for(tvdb_regenerate_links), regenerate_links_li, False), # Update all info (url, ListItem, isFolder) - (plugin.url_for(tvdb_update_all_info), ListItem(label=plugin_addon.getLocalizedString(30386)), False) + (plugin.url_for(tvdb_update_all_info), update_all_info_li, False) ] # add items to 'TvDB' directory addDirectoryItems(handle=plugin.handle, items=directory_items, totalItems=directory_items.__len__()) @@ -790,13 +883,22 @@ def show_shoko_moviedb_directory(): # MovieDB (Folder) # - Update all info (item) - kodi_models.set_content('tvshows') + # kodi_models.set_content('tvshows') # set category to ' .. / Shoko / MovieDB' kodi_models.set_category(f'{plugin_addon.getLocalizedString(30115)} / {plugin_addon.getLocalizedString(30370)}') + list_item_art = { + 'poster': f'{kodi_models.plugin_img_path}/icons/command.png', + 'icon': f'{kodi_models.plugin_img_path}/icons/command.png' + } + + update_all_info_li = xbmcgui.ListItem(label=plugin_addon.getLocalizedString(30387)) + update_all_info_li.setArt(list_item_art) + update_all_info_li.setInfo(type="video", infoLabels={"plot": plugin_addon.getLocalizedString(30407)}) # setting 'description' + directory_items = [ # Update all info (url, ListItem, isFolder) - (plugin.url_for(moviedb_update_all_info), ListItem(label=plugin_addon.getLocalizedString(30387)), False) + (plugin.url_for(moviedb_update_all_info), update_all_info_li, False) ] # add items to 'MovieDB' directory addDirectoryItems(handle=plugin.handle, items=directory_items, totalItems=directory_items.__len__()) @@ -818,15 +920,27 @@ def show_shoko_images_directory(): # - Update all (item) # - Validate all (item) - kodi_models.set_content('tvshows') + # kodi_models.set_content('tvshows') # set category to ' .. / Shoko / Images' kodi_models.set_category(f'{plugin_addon.getLocalizedString(30115)} / {plugin_addon.getLocalizedString(30371)}') + list_item_art = { + 'poster': f'{kodi_models.plugin_img_path}/icons/command.png', + 'icon': f'{kodi_models.plugin_img_path}/icons/command.png' + } + + update_all_li = xbmcgui.ListItem(label=plugin_addon.getLocalizedString(30388)) + update_all_li.setArt(list_item_art) + update_all_li.setInfo(type="video", infoLabels={"plot": plugin_addon.getLocalizedString(30408)}) # setting 'description' + validate_all_li = xbmcgui.ListItem(label=plugin_addon.getLocalizedString(30389)) + validate_all_li.setArt(list_item_art) + validate_all_li.setInfo(type="video", infoLabels={"plot": plugin_addon.getLocalizedString(30409)}) # setting 'description' + directory_items = [ # Update all (url, ListItem, isFolder) - (plugin.url_for(images_update_all), ListItem(label=plugin_addon.getLocalizedString(30388)), False), + (plugin.url_for(images_update_all), update_all_li, False), # Validate all (url, ListItem, isFolder) - (plugin.url_for(images_validate_all), ListItem(label=plugin_addon.getLocalizedString(30389)), False) + (plugin.url_for(images_validate_all), validate_all_li, False) ] # add items to 'Images' directory addDirectoryItems(handle=plugin.handle, items=directory_items, totalItems=directory_items.__len__()) @@ -857,15 +971,27 @@ def show_shoko_trakt_directory(): # - Sync Trakt collection (item) # - Update all info (item) - kodi_models.set_content('tvshows') + # kodi_models.set_content('tvshows') # set category to ' .. / Shoko / Trakt' kodi_models.set_category(f'{plugin_addon.getLocalizedString(30115)} / {plugin_addon.getLocalizedString(30372)}') + list_item_art = { + 'poster': f'{kodi_models.plugin_img_path}/icons/command.png', + 'icon': f'{kodi_models.plugin_img_path}/icons/command.png' + } + + sync_trakt_collection_li = xbmcgui.ListItem(label=plugin_addon.getLocalizedString(30390)) + sync_trakt_collection_li.setArt(list_item_art) + sync_trakt_collection_li.setInfo(type="video", infoLabels={"plot": plugin_addon.getLocalizedString(30410)}) # setting 'description' + update_all_info_li = xbmcgui.ListItem(label=plugin_addon.getLocalizedString(30391)) + update_all_info_li.setArt(list_item_art) + update_all_info_li.setInfo(type="video", infoLabels={"plot": plugin_addon.getLocalizedString(30411)}) # setting 'description' + directory_items = [ # Sync Trakt collection (url, ListItem, isFolder) - (plugin.url_for(trakt_sync_trakt_collection), ListItem(label=plugin_addon.getLocalizedString(30390)), False), + (plugin.url_for(trakt_sync_trakt_collection), sync_trakt_collection_li, False), # Update all info (url, ListItem, isFolder) - (plugin.url_for(trakt_update_all_info), ListItem(label=plugin_addon.getLocalizedString(30391)), False) + (plugin.url_for(trakt_update_all_info), update_all_info_li, False) ] # add items to 'Trakt' directory addDirectoryItems(handle=plugin.handle, items=directory_items, totalItems=directory_items.__len__()) diff --git a/resources/language/resource.language.en_GB/strings.po b/resources/language/resource.language.en_GB/strings.po index 379a12c..bb05f0c 100644 --- a/resources/language/resource.language.en_GB/strings.po +++ b/resources/language/resource.language.en_GB/strings.po @@ -1710,4 +1710,94 @@ msgstr "The command has been sent" #: nakamoriplugin.py msgctxt "#30393" msgid "Rescan folder" -msgstr "Rescan folder" \ No newline at end of file +msgstr "Rescan folder" + +#: nakamoriplugin.py +msgctxt "#30394" +msgid "Used by the 'Unrecognized' utility to find files in your library that don't match to a file in AniDB." +msgstr "Used by the 'Unrecognized' utility to find files in your library that don't match to a file in AniDB." + +#: nakamoriplugin.py +msgctxt "#30395" +msgid "Deletes all existing groups in Shoko and recreates them" +msgstr "Deletes all existing groups in Shoko and recreates them" + +#: nakamoriplugin.py +msgctxt "#30396" +msgid "Updates all media info" +msgstr "Updates all media info" + +#: nakamoriplugin.py +msgctxt "#30397" +msgid "Recalculates series stats and group filters" +msgstr "Recalculates series stats and group filters" + +#: nakamoriplugin.py +msgctxt "#30398" +msgid "Force downloads XML data from AniDB. This should only be necessary if the XML has been edited/deleted or Shoko has closed/crashed unexpectedly" +msgstr "Force downloads XML data from AniDB. This should only be necessary if the XML has been edited/deleted or Shoko has closed/crashed unexpectedly" + +#: nakamoriplugin.py +msgctxt "#30399" +msgid "Sync Votes from Shoko to AniDB" +msgstr "Sync Votes from Shoko to AniDB" + +#: nakamoriplugin.py +msgctxt "#30400" +msgid "Syncs all of the states in Shoko's library to AniDB. BEWARE THIS IS ONE WAY AND CAN ERASE ANIDB DATA IRREVERSIBLY" +msgstr "Syncs all of the states in Shoko's library to AniDB. BEWARE THIS IS ONE WAY AND CAN ERASE ANIDB DATA IRREVERSIBLY" + +#: nakamoriplugin.py +msgctxt "#30401" +msgid "Updates All AniDB Series Info" +msgstr "Updates All AniDB Series Info" + +#: nakamoriplugin.py +msgctxt "#30402" +msgid "Removes entries in Shoko and MyList for files thats are no longer accessible" +msgstr "Removes entries in Shoko and MyList for files thats are no longer accessible" + +#: nakamoriplugin.py +msgctxt "#30403" +msgid "Removes entries in Shoko (but keeps them in MyList) for files thats are no longer accessible" +msgstr "Removes entries in Shoko (but keeps them in MyList) for files thats are no longer accessible" + +#: nakamoriplugin.py +msgctxt "#30404" +msgid "Checks for new files in your Shoko folders, hashes them, and scans sites (AniDB, TvDB, etc) for metadata and images" +msgstr "Checks for new files in your Shoko folders, hashes them, and scans sites (AniDB, TvDB, etc) for metadata and images" + +#: nakamoriplugin.py +msgctxt "#30405" +msgid "Regenerate all episode matchings for TvDB. You should not need to run this unless someone from the Shoko team or the release notes have told you to" +msgstr "Regenerate all episode matchings for TvDB. You should not need to run this unless someone from the Shoko team or the release notes have told you to" + +#: nakamoriplugin.py +msgctxt "#30406" +msgid "Updates all TvDB Series Info" +msgstr "Updates all TvDB Series Info" + +#: nakamoriplugin.py +msgctxt "#30407" +msgid "Updates all MovieDB info" +msgstr "Updates all MovieDB info" + +#: nakamoriplugin.py +msgctxt "#30408" +msgid "Updates and downloads any missing images" +msgstr "Updates and downloads any missing images" + +#: nakamoriplugin.py +msgctxt "#30409" +msgid "Finds any invalid images and redownloads them" +msgstr "Finds any invalid images and redownloads them" + +#: nakamoriplugin.py +msgctxt "#30410" +msgid "Sync states from Trakt into Shoko - if you have Trakt setup" +msgstr "Sync states from Trakt into Shoko - if you have Trakt setup" + +#: nakamoriplugin.py +msgctxt "#30411" +msgid "Sync all Trakt info into Shoko" +msgstr "Sync all Trakt info into Shoko" \ No newline at end of file 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/command.png b/resources/media/icons/command.png new file mode 100644 index 0000000..ea95703 Binary files /dev/null and b/resources/media/icons/command.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