diff --git a/plugin.video.alfa/channels/pelispedia.py b/plugin.video.alfa/channels/pelispedia.py
index edaeb8ee..4ff2035a 100644
--- a/plugin.video.alfa/channels/pelispedia.py
+++ b/plugin.video.alfa/channels/pelispedia.py
@@ -264,39 +264,47 @@ def listado(item):
logger.info()
itemlist = []
- action = "findvideos"
- content_type = "movie"
-
- if item.extra == 'serie':
- action = "temporadas"
- content_type = "tvshow"
-
# ~ data = httptools.downloadpage(item.url).data
data = obtener_data(item.url)
data = re.sub(r"\n|\r|\t|\s{2}| |
|
|
|
|
|-\s", "", data)
- # logger.info("data -- {}".format(data))
- patron = '
(.*?)
' - matches = re.compile(patron, re.DOTALL).findall(data) + if item.extra == 'movies': + action = "findvideos" + content_type = "movie" - for scrapedurl, scrapedtitle, scrapedthumbnail, scrapedyear, scrapedplot in matches: - title = "%s (%s)" % (scrapertools.unescape(scrapedtitle.strip()), scrapedyear) - plot = scrapertools.entityunescape(scrapedplot) + patron = '(.*?)
' + matches = re.compile(patron, re.DOTALL).findall(data) - new_item = Item(channel=__channel__, title=title, url=urlparse.urljoin(CHANNEL_HOST, scrapedurl), action=action, - thumbnail=scrapedthumbnail, plot=plot, context="", extra=item.extra, - contentType=content_type, fulltitle=title) + for scrapedurl, scrapedtitle, scrapedthumbnail, scrapedyear, scrapedplot in matches: + title = "%s (%s)" % (scrapertools.unescape(scrapedtitle.strip()), scrapedyear) + plot = scrapertools.entityunescape(scrapedplot) - if item.extra == 'serie': - new_item.show = scrapertools.unescape(scrapedtitle.strip()) - # fix en algunos casos la url está mal - new_item.url = new_item.url.replace(CHANNEL_HOST + "pelicula", CHANNEL_HOST + "serie") - else: + new_item = Item(channel=__channel__, title=title, url=urlparse.urljoin(CHANNEL_HOST, scrapedurl), action=action, + thumbnail=scrapedthumbnail, plot=plot, context="", extra=item.extra, + contentType=content_type) new_item.fulltitle = scrapertools.unescape(scrapedtitle.strip()) new_item.infoLabels = {'year': scrapedyear} + itemlist.append(new_item) + + else: + action = "temporadas" + content_type = "tvshow" + + patron = '