Test Aggiornamento Videoteca Ad ogni avvio di Kodi e giornaliero

This commit is contained in:
Alhaziel01
2022-08-19 10:48:22 +02:00
parent 80261ee7ce
commit d4129b0da2
4 changed files with 17 additions and 9 deletions
@@ -2552,6 +2552,10 @@ msgctxt "#60607"
msgid "Each time you start Kodi" msgid "Each time you start Kodi"
msgstr "" msgstr ""
msgctxt "#60608"
msgid "Each time you start Kodi and daily"
msgstr ""
msgctxt "#60609" msgctxt "#60609"
msgid "10 sec" msgid "10 sec"
msgstr "" msgstr ""
@@ -2551,6 +2551,10 @@ msgctxt "#60607"
msgid "Each time you start Kodi" msgid "Each time you start Kodi"
msgstr "Ad ogni avvio di Kodi" msgstr "Ad ogni avvio di Kodi"
msgctxt "#60608"
msgid "Each time you start Kodi and daily"
msgstr "Ad ogni avvio di Kodi e giornaliero"
msgctxt "#60609" msgctxt "#60609"
msgid "10 sec" msgid "10 sec"
msgstr "10 sec" msgstr "10 sec"
+5 -6
View File
@@ -123,8 +123,8 @@ def check_for_update(overwrite=True):
try: try:
if overwrite or \ if overwrite or \
config.get_setting("update", "videolibrary") == 4 or \ config.get_setting("update", "videolibrary") in [4, 5] or \
(config.get_setting("update", "videolibrary") != 0 and hoy.strftime('%Y-%m-%d') != config.get_setting('updatelibrary_last_check', 'videolibrary')): (config.get_setting("update", "videolibrary") not in [0, 4] and hoy.strftime('%Y-%m-%d') != config.get_setting('updatelibrary_last_check', 'videolibrary')):
config.set_setting("updatelibrary_last_check", hoy.strftime('%Y-%m-%d'), "videolibrary") config.set_setting("updatelibrary_last_check", hoy.strftime('%Y-%m-%d'), "videolibrary")
@@ -437,8 +437,8 @@ class AddonMonitor(xbmc.Monitor):
def scheduleVideolibrary(self): def scheduleVideolibrary(self):
self.update_setting = config.get_setting("update", "videolibrary") self.update_setting = config.get_setting("update", "videolibrary")
# 2= daily 3=daily and when kodi starts # 2 = Daily, 3 = When Kodi starts and daily, 5 = Each time you start Kodi and daily
if self.update_setting == 2 or self.update_setting == 3: if self.update_setting in [2, 3, 5]:
self.update_hour = config.get_setting("everyday_delay", "videolibrary") * 4 self.update_hour = config.get_setting("everyday_delay", "videolibrary") * 4
schedule.every().day.at(str(self.update_hour).zfill(2) + ':00').do(run_threaded, check_for_update, (False,)).tag('videolibrary') schedule.every().day.at(str(self.update_hour).zfill(2) + ':00').do(run_threaded, check_for_update, (False,)).tag('videolibrary')
logger.debug('scheduled videolibrary at ' + str(self.update_hour).zfill(2) + ':00') logger.debug('scheduled videolibrary at ' + str(self.update_hour).zfill(2) + ':00')
@@ -501,8 +501,7 @@ if __name__ == "__main__":
updater.refreshLang() updater.refreshLang()
# prepare to replace strSettings # prepare to replace strSettings
path_settings = xbmc.translatePath( path_settings = xbmc.translatePath("special://profile/addon_data/metadata.tvshows.themoviedb.org/settings.xml")
"special://profile/addon_data/metadata.tvshows.themoviedb.org/settings.xml")
settings_data = filetools.read(path_settings) settings_data = filetools.read(path_settings)
strSettings = ' '.join(settings_data.split()).replace("> <", "><") strSettings = ' '.join(settings_data.split()).replace("> <", "><")
strSettings = strSettings.replace("\"", "\'") strSettings = strSettings.replace("\"", "\'")
+4 -3
View File
@@ -14,7 +14,8 @@
"@60603", "@60603",
"@60604", "@60604",
"@60605", "@60605",
"@60607" "@60607",
"@60608"
] ]
}, },
{ {
@@ -22,7 +23,7 @@
"type": "list", "type": "list",
"label": "@60606", "label": "@60606",
"default": 0, "default": 0,
"enabled": "eq(-1,@60603)|eq(-1,@60605)|eq(-1,@60607)", "enabled": "eq(-1,@60603)|eq(-1,@60605)|eq(-1,@60607)|eq(-1,@60608)",
"lvalues": [ "lvalues": [
"No", "No",
"@60609", "@60609",
@@ -36,7 +37,7 @@
"type": "list", "type": "list",
"label": "@60613", "label": "@60613",
"default": 1, "default": 1,
"enabled": "eq(-2,@60604)|eq(-2,@60605)", "enabled": "eq(-2,@60604)|eq(-2,@60605)|eq(-1,@60607)",
"lvalues": [ "lvalues": [
"00:00", "00:00",
"04:00", "04:00",