Corrección errores de traducción y mejoras internas
Corregido error al marcar como vista/no vista una serie o película en la Videoteca de Alfa - Añadido soporte de etiquetas de idioma tipo @xxxxx, en campo ‘enabled’ en menus de confoguración - Reparación de Videlibrary.json quitando ']' en campos ‘enabled’ Newpct1: arreglo de error en series antiguas Generictools: mejora de etiquetado de títulos
This commit is contained in:
@@ -1386,8 +1386,12 @@ def episodios(item):
|
||||
pattern = ".*?[^>]+>.*?Temporada\s*(?P<season>\d+)?.*?Capitulo(?:s)?\s*(?P<episode>\d+)?" \
|
||||
"(?:.*?(?P<episode2>\d+)?)<.+?<span[^>]+>(?P<lang>.*?)?<\/span>\s*Calidad\s*<span[^>]+>" \
|
||||
"[\[]\s*(?P<quality>.*?)?\s*[\]]<\/span>"
|
||||
if "Especial" in info: # Capitulos Especiales
|
||||
pattern = ".*?[^>]+>.*?Temporada.*?\[.*?(?P<season>\d+).*?\].*?Capitulo.*?\[\s*(?P<episode>\d+).*?\]?(?:.*?(?P<episode2>\d+)?)<.+?<span[^>]+>(?P<lang>.*?)?<\/span>\s*Calidad\s*<span[^>]+>[\[]\s*(?P<quality>.*?)?\s*[\]]<\/span>"
|
||||
if not scrapertools.find_single_match(info, pattern):
|
||||
if "especial" in info.lower(): # Capitulos Especiales
|
||||
pattern = ".*?[^>]+>.*?Temporada.*?\[.*?(?P<season>\d+).*?\].*?Capitulo.*?\[\s*(?P<episode>\d+).*?\]?(?:.*?(?P<episode2>\d+)?)<.+?<span[^>]+>(?P<lang>.*?)?<\/span>\s*Calidad\s*<span[^>]+>[\[]\s*(?P<quality>.*?)?\s*[\]]<\/span>"
|
||||
elif "miniserie" in info.lower() or "completa" in info.lower(): # Series o miniseries completa
|
||||
logger.debug("patron episodioNEW - MINISERIE: " + info)
|
||||
info = '><strong>%sTemporada %s Capitulo 01_99</strong> - <span >Español Castellano</span> Calidad <span >[%s]</span>' % (item_local.contentSerieName, season, item_local.quality)
|
||||
|
||||
if not scrapertools.find_single_match(info, pattern): #en caso de error de formato, creo uno básico
|
||||
logger.debug("patron episodioNEW: " + pattern)
|
||||
@@ -1413,6 +1417,9 @@ def episodios(item):
|
||||
elif "completa" in info.lower():
|
||||
info = info.replace("COMPLETA", "Caps. 01_99")
|
||||
pattern = 'Temp.*?(?P<season>\d+).*?Cap\w?\.\s\d?(?P<episode>\d{2})(?:.*?(?P<episode2>\d{2}))?.*?\[(?P<quality>.*?)\].*?\[(?P<lang>\w+)\]?'
|
||||
if not scrapertools.find_single_match(info, pattern): #en caso de error de formato, creo uno básico
|
||||
logger.debug(info)
|
||||
info = '%s - Temp.%s [Caps. 01_99][%s][Spanish]' % (item_local.contentSerieName, season, item_local.quality)
|
||||
if scrapertools.find_single_match(info, '\[Cap.\d{2,3}'):
|
||||
pattern = "\[(?P<quality>.*?)\].*?\[Cap.(?P<season>\d).*?(?P<episode>\d{2})(?:_(?P<season2>\d+)" \
|
||||
"(?P<episode2>\d{2}))?.*?\].*?(?:\[(?P<lang>.*?)\])?"
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
"label": "@60606",
|
||||
"default": 0,
|
||||
"visible": true,
|
||||
"enabled": "eq(-1,@60603])|eq(-1,@60605])",
|
||||
"enabled": "eq(-1,@60603)|eq(-1,@60605)",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"@60609",
|
||||
@@ -39,7 +39,7 @@
|
||||
"label": "@60613",
|
||||
"default": 1,
|
||||
"visible": true,
|
||||
"enabled": "eq(-2,@60604])|eq(-2,@60605])",
|
||||
"enabled": "eq(-2,@60604)|eq(-2,@60605)",
|
||||
"lvalues": [
|
||||
"00:00",
|
||||
"04:00",
|
||||
@@ -53,7 +53,7 @@
|
||||
"label": "@60614",
|
||||
"default": 0,
|
||||
"visible": true,
|
||||
"enabled": "!eq(-3,@60615])",
|
||||
"enabled": "!eq(-3,@60615)",
|
||||
"lvalues": [
|
||||
"@60616",
|
||||
"@60617"
|
||||
@@ -64,7 +64,7 @@
|
||||
"type": "list",
|
||||
"label": "@60618",
|
||||
"default": 0,
|
||||
"enabled": "!eq(-4,@60615])",
|
||||
"enabled": "!eq(-4,@60615)",
|
||||
"lvalues": [
|
||||
"@60619",
|
||||
"@60620"
|
||||
|
||||
@@ -647,7 +647,12 @@ def post_tmdb_findvideos(item, itemlist):
|
||||
title = '%sx%s' % (str(item.contentSeason), str(item.contentEpisodeNumber).zfill(2)) #Temporada y Episodio
|
||||
if item.infoLabels['temporada_num_episodios']:
|
||||
title = '%s (de %s)' % (title, str(item.infoLabels['temporada_num_episodios'])) #Total Episodios
|
||||
title = '%s %s' % (title, item.infoLabels['episodio_titulo']) #Título Episodio
|
||||
|
||||
#Si son episodios múltiples, y viene de Videoteca, ponemos nombre de serie
|
||||
if " al " in item.title and not " al " in item.infoLabels['episodio_titulo']:
|
||||
title = '%s al %s - ' % (title, scrapertools.find_single_match(item.title, 'al (\d+)'))
|
||||
else:
|
||||
title = '%s %s' % (title, item.infoLabels['episodio_titulo']) #Título Episodio
|
||||
title_gen = '%s, %s [COLOR yellow][%s][/COLOR] [%s] [COLOR limegreen][%s][/COLOR] [COLOR red]%s[/COLOR] [%s]' % (title, item.contentSerieName, item.infoLabels['year'], rating, item.quality, str(item.language), scrapertools.find_single_match(item.title, '\s\[(\d+,?\d*?\s\w[b|B])\]')) #Rating, Calidad, Idioma, Tamaño
|
||||
if item.infoLabels['status'] and item.infoLabels['status'].lower() == "ended":
|
||||
title_gen = '[TERM.] %s' % title_gen #Marca cuando la Serie está terminada y no va a haber más producción
|
||||
@@ -668,7 +673,7 @@ def post_tmdb_findvideos(item, itemlist):
|
||||
|
||||
if item.channel_alt:
|
||||
title_gen = '[COLOR yellow]%s [/COLOR][ALT]: %s' % (item.category.capitalize(), title_gen)
|
||||
elif config.get_setting("quit_channel_name", "videolibrary") == 1 and item.contentChannel == "videolibrary":
|
||||
elif (config.get_setting("quit_channel_name", "videolibrary") == 1 or item.channel == channel_py) and item.contentChannel == "videolibrary":
|
||||
title_gen = '%s: %s' % (item.category.capitalize(), title_gen)
|
||||
|
||||
#Pintamos el pseudo-título con toda la información disponible del vídeo
|
||||
|
||||
@@ -111,7 +111,7 @@ class SettingsWindow(xbmcgui.WindowXMLDialog):
|
||||
]
|
||||
}
|
||||
|
||||
Los campos 'label', 'default' y 'lvalues' pueden ser un numero precedido de '@'. En cuyo caso se
|
||||
Los campos 'label', 'default', 'enabled' y 'lvalues' pueden ser un numero precedido de '@'. En cuyo caso se
|
||||
buscara el literal en el archivo string.xml del idioma seleccionado.
|
||||
Los campos 'enabled' y 'visible' admiten los comparadores eq(), gt() e it() y su funcionamiento se
|
||||
describe en: http://kodi.wiki/view/Add-on_settings#Different_types
|
||||
@@ -273,6 +273,9 @@ class SettingsWindow(xbmcgui.WindowXMLDialog):
|
||||
if c["type"] == "label":
|
||||
control_value = c["control"].getLabel()
|
||||
|
||||
if value.startswith('@') and unicode(value[1:]).isnumeric():
|
||||
value = config.get_localized_string(int(value[1:]))
|
||||
|
||||
# Operaciones lt "menor que" y gt "mayor que", requieren que las comparaciones sean numeros, sino devuelve
|
||||
# False
|
||||
if operator in ["lt", "!lt", "gt", "!gt"]:
|
||||
|
||||
@@ -235,8 +235,10 @@ def mark_content_as_watched_on_kodi(item, value=1):
|
||||
data = get_data(payload)
|
||||
if 'result' in data and "movies" in data['result']:
|
||||
|
||||
filename = filetools.basename(item.strm_path)
|
||||
head, tail = filetools.split(filetools.split(item.strm_path)[0])
|
||||
#filename = filetools.basename(item.strm_path)
|
||||
#head, tail = filetools.split(filetools.split(item.strm_path)[0])
|
||||
filename = filetools.basename(item.path)
|
||||
head, tail = filetools.split(filetools.split(item.path)[0])
|
||||
path = filetools.join(tail, filename)
|
||||
|
||||
for d in data['result']['movies']:
|
||||
@@ -258,8 +260,10 @@ def mark_content_as_watched_on_kodi(item, value=1):
|
||||
data = get_data(payload)
|
||||
if 'result' in data and "episodes" in data['result']:
|
||||
|
||||
filename = filetools.basename(item.strm_path)
|
||||
head, tail = filetools.split(filetools.split(item.strm_path)[0])
|
||||
#filename = filetools.basename(item.strm_path)
|
||||
#head, tail = filetools.split(filetools.split(item.strm_path)[0])
|
||||
filename = filetools.basename(item.path)
|
||||
head, tail = filetools.split(filetools.split(item.path)[0])
|
||||
path = filetools.join(tail, filename)
|
||||
|
||||
for d in data['result']['episodes']:
|
||||
|
||||
Reference in New Issue
Block a user