Disabilitata scelta Scraper (TMDB di Default)

This commit is contained in:
Alhaziel01
2021-02-05 18:24:53 +01:00
parent b8ba6f9bba
commit c51861e4a4
3 changed files with 18 additions and 14 deletions
+5 -3
View File
@@ -32,19 +32,21 @@ def find_and_set_infoLabels(item):
# Get the default Scraper of the configuration according to the content type # Get the default Scraper of the configuration according to the content type
if item.contentType == "movie": 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" tipo_contenido = "movie"
title = item.contentTitle title = item.contentTitle
# Complete list of options for this type of content # Complete list of options for this type of content
list_opciones_cuadro.append(scrapers_disponibles['tmdb']) list_opciones_cuadro.append(scrapers_disponibles['tmdb'])
else: 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" tipo_contenido = "serie"
title = item.contentSerieName title = item.contentSerieName
# Complete list of options for this type of content # Complete list of options for this type of content
list_opciones_cuadro.append(scrapers_disponibles['tmdb']) 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 # We import the scraper
try: try:
+11 -11
View File
@@ -996,13 +996,14 @@ def clean(path_list=[]):
sql = 'SELECT idPath FROM path where strPath LIKE "%s"' % sql_path sql = 'SELECT idPath FROM path where strPath LIKE "%s"' % sql_path
logger.debug('sql: ' + sql) logger.debug('sql: ' + sql)
nun_records, records = execute_sql_kodi(sql) nun_records, records = execute_sql_kodi(sql)
idPath = records[0][0] if records:
sql = 'DELETE from path WHERE idPath=%s' % idPath idPath = records[0][0]
logger.debug('sql: ' + sql) sql = 'DELETE from path WHERE idPath=%s' % idPath
nun_records, records = execute_sql_kodi(sql) logger.debug('sql: ' + sql)
sql = 'DELETE from path WHERE idParentPath=%s' % idPath nun_records, records = execute_sql_kodi(sql)
logger.debug('sql: ' + sql) sql = 'DELETE from path WHERE idParentPath=%s' % idPath
nun_records, records = execute_sql_kodi(sql) logger.debug('sql: ' + sql)
nun_records, records = execute_sql_kodi(sql)
from core import videolibrarytools from core import videolibrarytools
for path, folders, files in filetools.walk(videolibrarytools.MOVIES_PATH): 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): def ask_set_content(silent=False):
logger.debug() logger.debug()
logger.debug("videolibrary_kodi %s" % config.get_setting("videolibrary_kodi")) logger.debug("videolibrary_kodi %s" % config.get_setting("videolibrary_kodi"))
def do_config(custom=False): def do_config(custom=False):
if set_content("movie", True, custom) and set_content("tvshow", True, custom): 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)) 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_movies", movies_folder)
config.set_setting("folder_tvshows", tvshows_folder) config.set_setting("folder_tvshows", tvshows_folder)
config.verify_directories_created() config.verify_directories_created()
do_config(True) do_config(False)
# default path and folders # default path and folders
else: else:
platformtools.dialog_ok(config.get_localized_string(80026), config.get_localized_string(80030)) platformtools.dialog_ok(config.get_localized_string(80026), config.get_localized_string(80030))
do_config(True) do_config(False)
# default settings # default settings
else: else:
platformtools.dialog_ok(config.get_localized_string(80026), config.get_localized_string(80027)) 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 # configuration from the settings menu
else: else:
platformtools.dialog_ok(config.get_localized_string(80026), config.get_localized_string(80023)) platformtools.dialog_ok(config.get_localized_string(80026), config.get_localized_string(80023))
do_config(True) do_config(False)
def next_ep(item): def next_ep(item):
+2
View File
@@ -87,6 +87,7 @@
"label": "@60651", "label": "@60651",
"enabled": false, "enabled": false,
"default": 0, "default": 0,
"visible": false,
"lvalues": [ "lvalues": [
"TMDB", "TMDB",
"None" "None"
@@ -97,6 +98,7 @@
"type": "list", "type": "list",
"label": "@60652", "label": "@60652",
"default": 0, "default": 0,
"visible": false,
"lvalues": [ "lvalues": [
"TMDB", "TMDB",
"TVDB" "TVDB"