From 2b50852146281deed8a8a6f6689ace3242b9beba Mon Sep 17 00:00:00 2001
From: Kingbox <37674310+lopezvg@users.noreply.github.com>
Date: Wed, 19 Sep 2018 14:49:28 +0200
Subject: [PATCH] =?UTF-8?q?PelisMagnet:=20redise=C3=B1o=20de=20Canal?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
plugin.video.alfa/channels/pelismagnet.json | 47 +-
plugin.video.alfa/channels/pelismagnet.py | 1074 ++++++++++++-------
2 files changed, 748 insertions(+), 373 deletions(-)
diff --git a/plugin.video.alfa/channels/pelismagnet.json b/plugin.video.alfa/channels/pelismagnet.json
index 03a2f6a1..b8c65189 100755
--- a/plugin.video.alfa/channels/pelismagnet.json
+++ b/plugin.video.alfa/channels/pelismagnet.json
@@ -17,7 +17,7 @@
"id": "include_in_global_search",
"type": "bool",
"label": "Incluir en busqueda global",
- "default": false,
+ "default": true,
"enabled": true,
"visible": true
},
@@ -29,6 +29,22 @@
"enabled": true,
"visible": true
},
+ {
+ "id": "filter_languages",
+ "type": "list",
+ "label": "Mostrar enlaces en idioma...",
+ "default": 0,
+ "enabled": true,
+ "visible": true,
+ "lvalues": [
+ "No filtrar",
+ "CAST",
+ "LAT",
+ "VO",
+ "VOS",
+ "VOSE"
+ ]
+ },
{
"id": "include_in_newest_torrent",
"type": "bool",
@@ -36,6 +52,35 @@
"default": true,
"enabled": true,
"visible": true
+ },
+ {
+ "id": "include_in_newest_peliculas",
+ "type": "bool",
+ "label": "Incluir en Novedades - Peliculas",
+ "default": true,
+ "enabled": true,
+ "visible": true
+ },
+ {
+ "id": "timeout_downloadpage",
+ "type": "list",
+ "label": "Timeout (segs.) en descarga de páginas o verificación de servidores",
+ "default": 10,
+ "enabled": true,
+ "visible": true,
+ "lvalues": [
+ "None",
+ "1",
+ "2",
+ "3",
+ "4",
+ "5",
+ "6",
+ "7",
+ "8",
+ "9",
+ "10"
+ ]
}
]
}
\ No newline at end of file
diff --git a/plugin.video.alfa/channels/pelismagnet.py b/plugin.video.alfa/channels/pelismagnet.py
index 9a6f08a1..0157347b 100644
--- a/plugin.video.alfa/channels/pelismagnet.py
+++ b/plugin.video.alfa/channels/pelismagnet.py
@@ -1,372 +1,702 @@
-# -*- coding: utf-8 -*-
-
-import re
-import urllib
-
-from core import httptools
-from core import jsontools
-from core import scrapertools
-from core import servertools
-from core.item import Item
-from platformcode import config, logger
-
-host = 'http://pelismag.net'
-api = host + '/api'
-api_serie = host + "/seapi"
-api_temp = host + "/sapi"
-__modo_grafico__ = config.get_setting("modo_grafico", "pelismagnet")
-
-
-def mainlist(item):
- logger.info()
-
- itemlist = list()
- itemlist.append(Item(channel=item.channel, action="pelis", title="[B]Peliculas[/B]",
- url=api + "?sort_by=''&page=0"))
- itemlist.append(Item(channel=item.channel, action="pelis", title=" Estrenos",
- url=api + "?sort_by=date_added&page=0"))
- itemlist.append(Item(channel=item.channel, action="pelis", title=" + Populares", url=api + "?page=0"))
- itemlist.append(Item(channel=item.channel, action="pelis", title=" + Valoradas",
- url=api + "?sort_by=rating&page=0"))
- itemlist.append(Item(channel=item.channel, action="menu_ord", title=" Ordenado por...",
- url=api))
- itemlist.append(
- Item(channel=item.channel, action="search", title=" Buscar...", url=api + "?keywords=%s&page=0"))
- itemlist.append(Item(channel=item.channel, action="series", title="[B]Series[/B]",
- url=api_serie + "?sort_by=''&page=0"))
- itemlist.append(Item(channel=item.channel, action="series", title=" Recientes",
- url=api_serie + "?sort_by=date_added&page=0"))
- itemlist.append(Item(channel=item.channel, action="series", title=" + Populares", url=api_serie + "?page=0"))
- itemlist.append(Item(channel=item.channel, action="series", title=" + Valoradas",
- url=api_serie + "?sort_by=rating&page=0"))
- itemlist.append(Item(channel=item.channel, action="menu_ord", title=" Ordenado por...",
- url=api_serie))
- itemlist.append(Item(channel=item.channel, action="search", title=" Buscar...",
- url=api_serie + "?keywords=%s&page=0"))
- itemlist.append(Item(channel=item.channel, action="configuracion", title="Configurar canal"))
-
- return itemlist
-
-
-def configuracion(item):
- from platformcode import platformtools
- ret = platformtools.show_channel_settings()
- platformtools.itemlist_refresh()
- return ret
-
-
-def menu_ord(item):
- logger.info()
-
- itemlist = list()
- itemlist.append(Item(channel=item.channel, action="menu_alf", title="Alfabético",
- url=item.url))
- itemlist.append(Item(channel=item.channel, action="menu_genero", title="Género",
- url=item.url))
-
- return itemlist
-
-
-def menu_alf(item):
- logger.info()
-
- itemlist = []
-
- for letra in ['[0-9]', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R',
- 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']:
- if 'series' in item.url:
- action = 'series'
- else:
- action = 'pelis'
- itemlist.append(Item(channel=item.channel, action=action, title=letra,
- url=item.url + "?keywords=^" + letra + "&page=0"))
-
- return itemlist
-
-
-def menu_genero(item):
- logger.info()
-
- itemlist = []
- # TODO: SOLO FUNCIONA POR AHORA A PARTIR DE KODI 17
- # httptools.downloadpage("https://kproxy.com/")
- # url = "https://kproxy.com/doproxy.jsp"
- # post = "page=%s&x=34&y=14" % urllib.quote(host + "/principal")
- # response = httptools.downloadpage(url, post, follow_redirects=False).data
- # url = scrapertools.find_single_match(response, '|
|
|
|
|-\s", "", data)
-
- data = scrapertools.find_single_match(data, '