Generictools: Mejoras internas

This commit is contained in:
Kingbox
2019-01-23 14:11:04 +01:00
parent 337c072b34
commit 214469782d
3 changed files with 14 additions and 7 deletions

View File

@@ -9,7 +9,7 @@
"torrent",
"movie",
"tvshow",
"vo"
"vos"
],
"settings": [
{

View File

@@ -214,7 +214,7 @@ def listado(item):
return itemlist #Salimos
#logger.debug("PATRON: " + patron)
logger.debug(matches)
#logger.debug(matches)
#logger.debug(data)
#Buscamos la próxima y la última página
@@ -543,6 +543,7 @@ def play(item): #Permite preparar la descarga de
if status:
return itemlist #IP bloqueada
if not scrapertools.find_single_match(data, patron):
itemlist.append(item.clone(action='', title=item.channel.capitalize() + ': ERROR 02: PLAY: No hay enlaces o ha cambiado la estructura de la Web. Verificar en la Web esto último y reportar el error con el log'))
return itemlist
item.url = urlparse.urljoin(host, scrapertools.find_single_match(data, patron))
@@ -756,7 +757,7 @@ def episodios(item):
item_local.infoLabels['episodio_titulo'] = 'al 99'
item_local.title = '%sx%s al 99 - Season Pack' % (str(item_local.contentSeason), str(item_local.contentEpisodeNumber).zfill(2))
else:
item_local.title = '%sx%s - %s' % (str(item_local.contentSeason), str(item_local.contentEpisodeNumber).zfill(2), scrapedtitle)
item_local.title = '%sx%s - ' % (str(item_local.contentSeason), str(item_local.contentEpisodeNumber).zfill(2))
if season_display > 0:
if item_local.contentSeason > season_display:
@@ -765,7 +766,7 @@ def episodios(item):
break
itemlist.append(item_local.clone())
#logger.debug(item_local)
if len(itemlist) > 1:
@@ -794,6 +795,8 @@ def check_blocked_IP(data, itemlist):
logger.error("ERROR 99: La IP ha sido bloqueada por la Web" + " / DATA: " + data)
itemlist.append(Item(channel=channel, url=host, title="[COLOR yellow]La IP ha sido bloqueada por la Web.[/COLOR]", folder=False, thumbnail=thumb_separador))
itemlist.append(Item(channel=channel, url=host, title="[COLOR yellow]Fuerce la renovación de la IP en el Router[/COLOR]", folder=False, thumbnail=thumb_separador))
from platformcode import platformtools
platformtools.dialog_notification("IP bloqueada", "RARBG: Reiniciar ROUTER")
return (True, itemlist)
return (False, itemlist)

View File

@@ -279,8 +279,8 @@ def post_tmdb_listado(item, itemlist):
if not item.category_new:
item.category_new = ''
for item_local in itemlist: #Recorremos el Itenlist generado por el canal
title = item_local.title
for item_local in itemlist: #Recorremos el Itemlist generado por el canal
title = re.sub(r'online|descarga|downloads|trailer|videoteca|gb|autoplay', '', item_local.title, flags=re.IGNORECASE).strip()
#logger.debug(item_local)
item_local.last_page = 0
@@ -375,6 +375,7 @@ def post_tmdb_listado(item, itemlist):
item_local.contentSerieName = item_local.from_title
if item_local.contentType == 'season':
item_local.title = item_local.from_title
title = re.sub(r'online|descarga|downloads|trailer|videoteca|gb|autoplay', '', item_local.title, flags=re.IGNORECASE).strip()
#Limpiamos calidad de títulos originales que se hayan podido colar
if item_local.infoLabels['originaltitle'].lower() in item_local.quality.lower():
@@ -774,6 +775,7 @@ def post_tmdb_episodios(item, itemlist):
del item_local.totalItems
item_local.unify = 'xyz'
del item_local.unify
item_local.title = re.sub(r'online|descarga|downloads|trailer|videoteca|gb|autoplay', '', item_local.title, flags=re.IGNORECASE).strip()
#logger.debug(item_local)
@@ -1017,9 +1019,11 @@ def post_tmdb_findvideos(item, itemlist):
# Saber si estamos en una ventana emergente lanzada desde una viñeta del menú principal,
# con la función "play_from_library"
item.unify = False
Window_IsMedia = False
try:
import xbmc
if xbmc.getCondVisibility('Window.IsMedia') == 1:
Window_IsMedia = True
item.unify = config.get_setting("unify")
except:
item.unify = config.get_setting("unify")
@@ -1095,7 +1099,7 @@ def post_tmdb_findvideos(item, itemlist):
tiempo = 0
if item.infoLabels['duration']:
try:
if config.get_platform(True)['num_version'] < 18:
if config.get_platform(True)['num_version'] < 18 or not Window_IsMedia:
tiempo = item.infoLabels['duration']
elif xbmc.getCondVisibility('Window.IsMedia') == 1:
item.quality = re.sub(r'\s?\[\d+:\d+\ h]', '', item.quality)