From c51861e4a4c73d3ce7ec54945b9802328bfd4005 Mon Sep 17 00:00:00 2001 From: Alhaziel01 Date: Fri, 5 Feb 2021 18:24:53 +0100 Subject: [PATCH] Disabilitata scelta Scraper (TMDB di Default) --- core/scraper.py | 8 +++++--- platformcode/xbmc_videolibrary.py | 22 +++++++++++----------- specials/videolibrary.json | 2 ++ 3 files changed, 18 insertions(+), 14 deletions(-) diff --git a/core/scraper.py b/core/scraper.py index 7d71407b..55158107 100644 --- a/core/scraper.py +++ b/core/scraper.py @@ -32,19 +32,21 @@ def find_and_set_infoLabels(item): # Get the default Scraper of the configuration according to the content type if item.contentType == "movie": - scraper_actual = ['tmdb'][config.get_setting("scraper_movies", "videolibrary")] + scraper_actual = 'tmdb' + # scraper_actual = ['tmdb'][config.get_setting("scraper_movies", "videolibrary")] tipo_contenido = "movie" title = item.contentTitle # Complete list of options for this type of content list_opciones_cuadro.append(scrapers_disponibles['tmdb']) else: - scraper_actual = ['tmdb', 'tvdb'][config.get_setting("scraper_tvshows", "videolibrary")] + scraper_actual = 'tmdb' + # scraper_actual = ['tmdb', 'tvdb'][config.get_setting("scraper_tvshows", "videolibrary")] tipo_contenido = "serie" title = item.contentSerieName # Complete list of options for this type of content list_opciones_cuadro.append(scrapers_disponibles['tmdb']) - list_opciones_cuadro.append(scrapers_disponibles['tvdb']) + # list_opciones_cuadro.append(scrapers_disponibles['tvdb']) # We import the scraper try: diff --git a/platformcode/xbmc_videolibrary.py b/platformcode/xbmc_videolibrary.py index ba9680b3..8f8fdc13 100644 --- a/platformcode/xbmc_videolibrary.py +++ b/platformcode/xbmc_videolibrary.py @@ -996,13 +996,14 @@ def clean(path_list=[]): sql = 'SELECT idPath FROM path where strPath LIKE "%s"' % sql_path logger.debug('sql: ' + sql) nun_records, records = execute_sql_kodi(sql) - idPath = records[0][0] - sql = 'DELETE from path WHERE idPath=%s' % idPath - logger.debug('sql: ' + sql) - nun_records, records = execute_sql_kodi(sql) - sql = 'DELETE from path WHERE idParentPath=%s' % idPath - logger.debug('sql: ' + sql) - nun_records, records = execute_sql_kodi(sql) + if records: + idPath = records[0][0] + sql = 'DELETE from path WHERE idPath=%s' % idPath + logger.debug('sql: ' + sql) + nun_records, records = execute_sql_kodi(sql) + sql = 'DELETE from path WHERE idParentPath=%s' % idPath + logger.debug('sql: ' + sql) + nun_records, records = execute_sql_kodi(sql) from core import videolibrarytools for path, folders, files in filetools.walk(videolibrarytools.MOVIES_PATH): @@ -1271,7 +1272,6 @@ def update_sources(new='', old=''): def ask_set_content(silent=False): logger.debug() logger.debug("videolibrary_kodi %s" % config.get_setting("videolibrary_kodi")) - def do_config(custom=False): if set_content("movie", True, custom) and set_content("tvshow", True, custom): platformtools.dialog_ok(config.get_localized_string(80026), config.get_localized_string(70104)) @@ -1306,11 +1306,11 @@ def ask_set_content(silent=False): config.set_setting("folder_movies", movies_folder) config.set_setting("folder_tvshows", tvshows_folder) config.verify_directories_created() - do_config(True) + do_config(False) # default path and folders else: platformtools.dialog_ok(config.get_localized_string(80026), config.get_localized_string(80030)) - do_config(True) + do_config(False) # default settings else: platformtools.dialog_ok(config.get_localized_string(80026), config.get_localized_string(80027)) @@ -1321,7 +1321,7 @@ def ask_set_content(silent=False): # configuration from the settings menu else: platformtools.dialog_ok(config.get_localized_string(80026), config.get_localized_string(80023)) - do_config(True) + do_config(False) def next_ep(item): diff --git a/specials/videolibrary.json b/specials/videolibrary.json index 67036c14..c92a3cbb 100644 --- a/specials/videolibrary.json +++ b/specials/videolibrary.json @@ -87,6 +87,7 @@ "label": "@60651", "enabled": false, "default": 0, + "visible": false, "lvalues": [ "TMDB", "None" @@ -97,6 +98,7 @@ "type": "list", "label": "@60652", "default": 0, + "visible": false, "lvalues": [ "TMDB", "TVDB"