Configurazione aggiornamento videoteca

This commit is contained in:
axlt2002
2020-05-22 18:22:28 +02:00
parent a17019cd6a
commit 84c5bb5f8b
4 changed files with 29 additions and 12 deletions

View File

@@ -829,6 +829,11 @@ def update_db(old_path, new_path, old_movies_folder, new_movies_folder, old_tvsh
sql = 'UPDATE path SET strPath="%s" WHERE idPath=%s' % (strPath, idPath)
logger.info('sql: ' + sql)
nun_records, records = execute_sql_kodi(sql)
else:
progress.update(100)
xbmc.sleep(1000)
progress.close()
return
p = 80
progress.update(p, config.get_localized_string(20000), config.get_localized_string(80013))

View File

@@ -2504,6 +2504,10 @@ msgctxt "#60598"
msgid "Video library configuration"
msgstr ""
msgctxt "#60599"
msgid "Video library update configuration"
msgstr ""
msgctxt "#60600"
msgid "TV shows"
msgstr ""
@@ -5181,7 +5185,7 @@ msgid "Remove"
msgstr ""
msgctxt "#70600"
msgid "Add Season"
msgid "Add season"
msgstr ""
msgctxt "#70601"

View File

@@ -2503,6 +2503,10 @@ msgctxt "#60598"
msgid "Video library configuration"
msgstr "Configurazione videoteca"
msgctxt "#60599"
msgid "Video library update configuration"
msgstr "Configurazione aggiornamento videoteca"
msgctxt "#60600"
msgid "TV shows"
msgstr "Serie TV"
@@ -3389,7 +3393,7 @@ msgstr "Server"
msgctxt "#70146"
msgid "Add to video library"
msgstr "Aggiungi alla Videoteca"
msgstr "Aggiungi alla videoteca"
msgctxt "#70147"
msgid "Video library (update TV show)"
@@ -5180,8 +5184,8 @@ msgid "Remove"
msgstr "Rimuovi"
msgctxt "#70600"
msgid "Add Season"
msgstr "Aggiungi Stagione"
msgid "Add season"
msgstr "Aggiungi stagione"
msgctxt "#70601"
msgid "Update from the Internet:"

View File

@@ -277,7 +277,7 @@ def list_tvshows(item):
if item_tvshow.active and int(item_tvshow.active) > 0:
texto_update = config.get_localized_string(60022)
value = 0
item_tvshow.title = typo(item_tvshow.title,'color kod')
item_tvshow.title += " [B]" + u"\u2022".encode('utf-8') + "[/B]"
# item_tvshow.text_color = "green"
else:
texto_update = config.get_localized_string(60023)
@@ -333,12 +333,12 @@ def list_tvshows(item):
itemlist.append(Item(channel=item.channel, action="update_videolibrary", thumbnail=item.thumbnail,
title=typo(config.get_localized_string(70269), 'bold color kod'), folder=False))
itemlist.append(Item(channel=item.channel, action="setting_update_videolibrary", thumbnail=item.thumbnail,
title=typo(config.get_localized_string(60601), 'bold color kod'), lista=lista, folder=False))
itemlist.append(Item(channel=item.channel, action="configure_update_videolibrary", thumbnail=item.thumbnail,
title=typo(config.get_localized_string(60599), 'bold color kod'), lista=lista, folder=False))
return itemlist
def setting_update_videolibrary(item):
def configure_update_videolibrary(item):
import xbmcgui
# Load list of options (active user channels that allow global search)
lista = []
@@ -364,7 +364,10 @@ def setting_update_videolibrary(item):
tvshow.active = 0
elif tvshow in seleccionados:
tvshow.active = 1
mark_tvshow_as_updatable(tvshow)
mark_tvshow_as_updatable(tvshow, silent=True)
platformtools.itemlist_refresh()
return True
@@ -770,7 +773,7 @@ def move_videolibrary(current_path, new_path, current_movies_folder, new_movies_
from platformcode import xbmc_videolibrary
movies_path, tvshows_path = xbmc_videolibrary.check_sources(new_movies_path, new_tvshows_path)
logger.info('check_sources: ' + movies_path + ', ' + tvshows_path)
logger.info('check_sources: ' + str(movies_path) + ', ' + str(tvshows_path))
if movies_path or tvshows_path:
if not movies_path:
filetools.rmdir(new_movies_path)
@@ -1110,13 +1113,14 @@ def mark_season_as_watched(item):
platformtools.itemlist_refresh()
def mark_tvshow_as_updatable(item):
def mark_tvshow_as_updatable(item, silent=False):
logger.info()
head_nfo, it = videolibrarytools.read_nfo(item.nfo)
it.active = item.active
filetools.write(item.nfo, head_nfo + it.tojson())
platformtools.itemlist_refresh()
if not silent:
platformtools.itemlist_refresh()
def delete(item):