Merge branch 'master' of https://github.com/kodiondemand/addon
This commit is contained in:
@@ -181,6 +181,7 @@ def list_tvshows(item):
|
|||||||
itemlist = []
|
itemlist = []
|
||||||
dead_list = []
|
dead_list = []
|
||||||
zombie_list = []
|
zombie_list = []
|
||||||
|
lista = []
|
||||||
# Obtenemos todos los tvshow.nfo de la videoteca de SERIES recursivamente
|
# Obtenemos todos los tvshow.nfo de la videoteca de SERIES recursivamente
|
||||||
for raiz, subcarpetas, ficheros in filetools.walk(videolibrarytools.TVSHOWS_PATH):
|
for raiz, subcarpetas, ficheros in filetools.walk(videolibrarytools.TVSHOWS_PATH):
|
||||||
for s in subcarpetas:
|
for s in subcarpetas:
|
||||||
@@ -276,6 +277,7 @@ def list_tvshows(item):
|
|||||||
if item_tvshow.active and int(item_tvshow.active) > 0:
|
if item_tvshow.active and int(item_tvshow.active) > 0:
|
||||||
texto_update = config.get_localized_string(60022)
|
texto_update = config.get_localized_string(60022)
|
||||||
value = 0
|
value = 0
|
||||||
|
item_tvshow.title = typo(item_tvshow.title,'color kod')
|
||||||
# item_tvshow.text_color = "green"
|
# item_tvshow.text_color = "green"
|
||||||
else:
|
else:
|
||||||
texto_update = config.get_localized_string(60023)
|
texto_update = config.get_localized_string(60023)
|
||||||
@@ -323,8 +325,7 @@ def list_tvshows(item):
|
|||||||
## verifica la existencia de los canales ##
|
## verifica la existencia de los canales ##
|
||||||
if len(item_tvshow.library_urls) > 0:
|
if len(item_tvshow.library_urls) > 0:
|
||||||
itemlist.append(item_tvshow)
|
itemlist.append(item_tvshow)
|
||||||
|
lista.append({'title':item_tvshow.contentTitle,'thumbnail':item_tvshow.thumbnail,'fanart':item_tvshow.fanart, 'active': value, 'nfo':tvshow_path})
|
||||||
|
|
||||||
|
|
||||||
if itemlist:
|
if itemlist:
|
||||||
itemlist = sorted(itemlist, key=lambda it: it.title.lower())
|
itemlist = sorted(itemlist, key=lambda it: it.title.lower())
|
||||||
@@ -332,8 +333,41 @@ def list_tvshows(item):
|
|||||||
itemlist.append(Item(channel=item.channel, action="update_videolibrary", thumbnail=item.thumbnail,
|
itemlist.append(Item(channel=item.channel, action="update_videolibrary", thumbnail=item.thumbnail,
|
||||||
title=typo(config.get_localized_string(70269), 'bold color kod'), folder=False))
|
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))
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
def setting_update_videolibrary(item):
|
||||||
|
import xbmcgui
|
||||||
|
# Load list of options (active user channels that allow global search)
|
||||||
|
lista = []
|
||||||
|
ids = []
|
||||||
|
preselect = []
|
||||||
|
|
||||||
|
for i, item_tvshow in enumerate(item.lista):
|
||||||
|
it = xbmcgui.ListItem(item_tvshow["title"], '')
|
||||||
|
it.setArt({'thumb': item_tvshow["thumbnail"], 'fanart': item_tvshow["fanart"]})
|
||||||
|
lista.append(it)
|
||||||
|
ids.append(Item(nfo=item_tvshow['nfo']))
|
||||||
|
if item_tvshow['active']<=0:
|
||||||
|
preselect.append(i)
|
||||||
|
|
||||||
|
# Dialog to select
|
||||||
|
ret = xbmcgui.Dialog().multiselect(config.get_localized_string(60601), lista, preselect=preselect, useDetails=True)
|
||||||
|
if not ret:
|
||||||
|
return False # order cancel
|
||||||
|
seleccionados = [ids[i] for i in ret]
|
||||||
|
|
||||||
|
for tvshow in ids:
|
||||||
|
if tvshow not in seleccionados:
|
||||||
|
tvshow.active = 0
|
||||||
|
elif tvshow in seleccionados:
|
||||||
|
tvshow.active = 1
|
||||||
|
mark_tvshow_as_updatable(tvshow)
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def get_seasons(item):
|
def get_seasons(item):
|
||||||
logger.info()
|
logger.info()
|
||||||
|
|||||||
Reference in New Issue
Block a user