diff --git a/plugin.video.alfa/channels/seriesdanko.json b/plugin.video.alfa/channels/seriesdanko.json
index 4e70b493..e90a9e48 100755
--- a/plugin.video.alfa/channels/seriesdanko.json
+++ b/plugin.video.alfa/channels/seriesdanko.json
@@ -15,7 +15,15 @@
"id": "include_in_global_search",
"type": "bool",
"label": "Incluir en busqueda global",
- "default": false,
+ "default": true,
+ "enabled": true,
+ "visible": true
+ },
+ {
+ "id": "include_in_newest_series",
+ "type": "bool",
+ "label": "Incluir en Novedades - Episodios de series",
+ "default": true,
"enabled": true,
"visible": true
},
@@ -33,6 +41,19 @@
"VO",
"VOS"
]
+ },
+ {
+ "id": "filterlinks",
+ "type": "list",
+ "label": "Mostrar enlaces de tipo...",
+ "default": 2,
+ "enabled": true,
+ "visible": true,
+ "lvalues": [
+ "Solo Descarga",
+ "Solo Online",
+ "No filtrar"
+ ]
}
]
}
\ No newline at end of file
diff --git a/plugin.video.alfa/channels/seriesdanko.py b/plugin.video.alfa/channels/seriesdanko.py
index 858a1ae7..08f9310a 100644
--- a/plugin.video.alfa/channels/seriesdanko.py
+++ b/plugin.video.alfa/channels/seriesdanko.py
@@ -33,12 +33,20 @@ def mainlist(item):
itemlist.append(Item(channel=item.channel, title="Buscar...", action="search",
url=urlparse.urljoin(HOST, "all.php")))
- #itemlist = filtertools.show_option(itemlist, item.channel, list_idiomas, CALIDADES)
+ itemlist = filtertools.show_option(itemlist, item.channel, list_idiomas, CALIDADES)
autoplay.show_option(item.channel, itemlist)
return itemlist
+def newest(categoria):
+ logger.info("categoria: %s" % categoria)
+ itemlist = []
+
+ if categoria == 'series':
+ itemlist = novedades(Item(url = HOST))
+
+ return itemlist
def novedades(item):
logger.info()
@@ -220,7 +228,7 @@ def episodios(item):
infoLabels=infoLabels))
- #itemlist = filtertools.get_links(itemlist, item, list_idiomas, CALIDADES)
+ itemlist = filtertools.get_links(itemlist, item, list_idiomas, CALIDADES)
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
# Opción "Añadir esta serie a la videoteca de XBMC"
@@ -241,14 +249,24 @@ def findvideos(item):
online = re.findall('
', data,
re.MULTILINE | re.DOTALL)
- itemlist = parse_videos(item, "Ver", online[0])
- itemlist.extend(parse_videos(item, "Descargar", online[1]))
+ itemlist = []
+
+ try:
+ filtro_enlaces = config.get_setting("filterlinks", item.channel)
+ except:
+ filtro_enlaces = 2
+
+
+ if filtro_enlaces != 0:
+ itemlist.extend(parse_videos(item, "Ver", online[0]))
+
+ if filtro_enlaces != 1:
+ itemlist.extend(parse_videos(item, "Descargar", online[1]))
- itemlist = filtertools.get_links(itemlist, item, list_idiomas, CALIDADES)
# Requerido para FilterTools
- itemlist = filtertools.get_links(itemlist, item, list_idiomas)
+ itemlist = filtertools.get_links(itemlist, item, list_idiomas, CALIDADES)
# Requerido para AutoPlay
diff --git a/plugin.video.alfa/channels/seriespapaya.json b/plugin.video.alfa/channels/seriespapaya.json
index 7f0acff1..010b4296 100755
--- a/plugin.video.alfa/channels/seriespapaya.json
+++ b/plugin.video.alfa/channels/seriespapaya.json
@@ -11,6 +11,22 @@
"anime"
],
"settings": [
+ {
+ "id": "include_in_global_search",
+ "type": "bool",
+ "label": "Incluir en busqueda global",
+ "default": true,
+ "enabled": true,
+ "visible": true
+ },
+ {
+ "id": "include_in_newest_series",
+ "type": "bool",
+ "label": "Incluir en Novedades - Episodios de series",
+ "default": true,
+ "enabled": true,
+ "visible": true
+ },
{
"id": "filter_languages",
"type": "list",
@@ -28,20 +44,17 @@
]
},
{
- "id": "include_in_global_search",
- "type": "bool",
- "label": "Incluir en busqueda global",
- "default": true,
+ "id": "filterlinks",
+ "type": "list",
+ "label": "Mostrar enlaces de tipo...",
+ "default": 2,
"enabled": true,
- "visible": true
- },
- {
- "id": "include_in_newest_series",
- "type": "bool",
- "label": "Incluir en Novedades - Episodios de series",
- "default": true,
- "enabled": true,
- "visible": true
+ "visible": true,
+ "lvalues": [
+ "Solo Descarga",
+ "Solo Online",
+ "No filtrar"
+ ]
}
]
}
diff --git a/plugin.video.alfa/channels/seriespapaya.py b/plugin.video.alfa/channels/seriespapaya.py
index 13d02b25..ddbc644f 100644
--- a/plugin.video.alfa/channels/seriespapaya.py
+++ b/plugin.video.alfa/channels/seriespapaya.py
@@ -132,17 +132,7 @@ def newest(categoria):
if categoria != 'series':
return []
- try:
- return novedades(Item())
-
- # Se captura la excepción, para no interrumpir al canal novedades si un canal falla
- except:
- import sys
- for line in sys.exc_info():
- logger.error("%s" % line)
-
- return []
-
+ return novedades(Item())
def episodios(item):
logger.info("url: %s" % item.url)
@@ -177,7 +167,10 @@ def search(item, texto):
logger.info("texto: %s" % texto)
data = httptools.downloadpage(urlparse.urljoin(HOST, "/buscar.php?term=%s" % texto)).data
data_dict = jsontools.load(data)
- tvshows = data_dict["myData"]
+ try:
+ tvshows = data_dict["myData"]
+ except:
+ return []
return [item.clone(action="episodios",
title=show["titulo"],
@@ -203,23 +196,34 @@ def findvideos(item):
links = re.findall(expr, data, re.MULTILINE | re.DOTALL)
- itemlist = [item.clone(
- action="play",
- title="{linkType} en {server} [{lang}] [{quality}] ({uploader}: {date})".format(
- linkType="Ver" if linkType != "descargar" else "Descargar",
- lang=IDIOMAS.get(lang, lang),
- date=date,
- server=server.rstrip(),
- quality=quality,
- uploader=uploader),
- server=server.rstrip(),
- url=urlparse.urljoin(HOST, url),
- language=IDIOMAS.get(lang,lang),
- quality=quality
- ) for lang, date, server, url, linkType, quality, uploader in links]
+ itemlist = []
+ try:
+ filtro_enlaces = config.get_setting("filterlinks", item.channel)
+ except:
+ filtro_enlaces = 2
+ typeListStr = ["Descargar", "Ver"]
+ for lang, date, server, url, linkType, quality, uploader in links:
+ linkTypeNum = 0 if linkType == "descargar" else 1
+ if filtro_enlaces != 2 and filtro_enlaces != linkTypeNum:
+ continue
+ itemlist.append(item.clone(
+ action="play",
+ title="{linkType} en {server} [{lang}] [{quality}] ({uploader}: {date})".format(
+ linkType=typeListStr[linkTypeNum],
+ lang=IDIOMAS.get(lang, lang),
+ date=date,
+ server=server.rstrip(),
+ quality=quality,
+ uploader=uploader),
+ server=server.rstrip(),
+ url=urlparse.urljoin(HOST, url),
+ language=IDIOMAS.get(lang,lang),
+ quality=quality
+ )
+ )
# Requerido para FilterTools