diff --git a/plugin.video.alfa/channels/newpct1.json b/plugin.video.alfa/channels/descargas2020.json similarity index 58% rename from plugin.video.alfa/channels/newpct1.json rename to plugin.video.alfa/channels/descargas2020.json index 26b6d67f..d413b2e0 100755 --- a/plugin.video.alfa/channels/newpct1.json +++ b/plugin.video.alfa/channels/descargas2020.json @@ -1,11 +1,11 @@ { - "id": "newpct1", - "name": "Newpct1", + "id": "descargas2020", + "name": "Descargas2020", "active": true, "adult": false, "language": ["cast", "lat"], - "thumbnail": "newpct1.png", - "banner": "newpct1.png", + "thumbnail": "http://descargas2020.com/d20/library/content/template/images/_logod2020.png", + "banner": "", "categories": [ "movie", "tvshow", @@ -28,6 +28,14 @@ "default": true, "enabled": true, "visible": true + }, + { + "id": "include_in_newest_4k", + "type": "bool", + "label": "Incluir en Novedades - 4K", + "default": true, + "enabled": true, + "visible": true } ] } \ No newline at end of file diff --git a/plugin.video.alfa/channels/descargas2020.py b/plugin.video.alfa/channels/descargas2020.py new file mode 100644 index 00000000..1fe2ca87 --- /dev/null +++ b/plugin.video.alfa/channels/descargas2020.py @@ -0,0 +1,217 @@ +# -*- coding: utf-8 -*- + +import re +import urllib +import urlparse + +from core import servertools +from core import scrapertools +from core.item import Item +from platformcode import logger +from core import httptools + +Host='http://descargas2020.com' + + +def mainlist(item): + logger.info() + + itemlist = [] + itemlist.append(Item(channel=item.channel, action="submenu", title="Películas",url=Host+"/peliculas/")) + itemlist.append(Item(channel=item.channel, action="submenu", title="Series",url=Host+"/series/")) + #itemlist.append(Item(channel=item.channel, action="listado", title="Anime", url=Host+"/anime/", + # viewmode="movie_with_plot")) + #itemlist.append( + # Item(channel=item.channel, action="listado", title="Documentales", url=Host+"/documentales/", + # viewmode="movie_with_plot")) + itemlist.append(Item(channel=item.channel, action="search", title="Buscar", url= Host+'/buscar')) + return itemlist + +def submenu(item): + logger.info() + itemlist = [] + + data = httptools.downloadpage(item.url).data + data = re.sub(r"\n|\r|\t|\s{2}| ", "", data) + patron = '