From 322a91a93606f478121c00b04fb0762c068aa74e Mon Sep 17 00:00:00 2001
From: Intel1 <25161862+Intel11@users.noreply.github.com>
Date: Mon, 28 May 2018 10:58:29 -0500
Subject: [PATCH] mastorrent: nuevo canal
---
plugin.video.alfa/channels/mastorrents.json | 33 ++
plugin.video.alfa/channels/mastorrents.py | 323 ++++++++++++++++++++
2 files changed, 356 insertions(+)
create mode 100644 plugin.video.alfa/channels/mastorrents.json
create mode 100644 plugin.video.alfa/channels/mastorrents.py
diff --git a/plugin.video.alfa/channels/mastorrents.json b/plugin.video.alfa/channels/mastorrents.json
new file mode 100644
index 00000000..6ebae2fc
--- /dev/null
+++ b/plugin.video.alfa/channels/mastorrents.json
@@ -0,0 +1,33 @@
+{
+ "id": "mastorrents",
+ "name": "MasTorrents",
+ "active": true,
+ "adult": false,
+ "language": ["cast","lat"],
+ "thumbnail": "https://s33.postimg.cc/3y8720l9b/mastorrents.png",
+ "banner": "",
+ "version": 1,
+ "categories": [
+ "movie",
+ "tvshow",
+ "torrent"
+ ],
+ "settings": [
+ {
+ "id": "include_in_newest_peliculas",
+ "type": "bool",
+ "label": "Incluir en Novedades - Peliculas",
+ "default": true,
+ "enabled": true,
+ "visible": true
+ },
+ {
+ "id": "include_in_newest_torrent",
+ "type": "bool",
+ "label": "Incluir en Novedades - Torrent",
+ "default": true,
+ "enabled": true,
+ "visible": true
+ }
+ ]
+}
\ No newline at end of file
diff --git a/plugin.video.alfa/channels/mastorrents.py b/plugin.video.alfa/channels/mastorrents.py
new file mode 100644
index 00000000..df53aece
--- /dev/null
+++ b/plugin.video.alfa/channels/mastorrents.py
@@ -0,0 +1,323 @@
+# -*- coding: utf-8 -*-
+# -*- Channel MasTorrents -*-
+# -*- Created for Alfa-addon -*-
+# -*- By the Alfa Develop Group -*-
+
+import re
+from channelselector import get_thumb
+from platformcode import logger
+from platformcode import config
+from core import scrapertools
+from core.item import Item
+from core import servertools
+from core import httptools
+from core import tmdb
+
+host = 'http://www.mastorrents.com/'
+
+def mainlist(item):
+ logger.info()
+
+ itemlist = []
+
+ itemlist.append(item.clone(title="Peliculas",
+ action="movie_list",
+ thumbnail=get_thumb("channels_movie.png")
+ ))
+
+ itemlist.append(item.clone(title="Series",
+ action="series_list",
+ thumbnail=get_thumb("channels_tvshow.png")
+ ))
+ return itemlist
+
+
+def movie_list(item):
+ logger.info()
+
+ itemlist = []
+
+ itemlist.append(item.clone(title="Todas",
+ action="lista",
+ url=host+'peliculas',
+ extra='movie',
+ thumbnail=get_thumb('all', auto=True)
+ ))
+
+ itemlist.append(item.clone(title="Generos",
+ action="genres",
+ url=host,
+ extra='movie',
+ thumbnail=get_thumb('genres', auto=True)
+ ))
+
+ itemlist.append(item.clone(title="Buscar",
+ action="search",
+ url=host + '?pTit=', thumbnail=get_thumb('search', auto=True),
+ extra='movie'
+ ))
+ return itemlist
+
+
+def series_list(item):
+ logger.info()
+
+ itemlist = []
+
+ itemlist.append(item.clone(title="Todas",
+ action="lista",
+ url=host + 'series',
+ extra='serie',
+ thumbnail=get_thumb('all', auto=True)
+ ))
+
+ itemlist.append(item.clone(title="Generos",
+ action="genres",
+ url=host + 'series/',
+ extra='serie',
+ thumbnail=get_thumb('genres', auto=True)
+ ))
+
+ itemlist.append(item.clone(title="Buscar",
+ action="search",
+ url=host + 'series/?pTit=',
+ extra='serie',
+ thumbnail=get_thumb('search', auto=True)
+ ))
+ return itemlist
+
+
+def get_source(url):
+ logger.info()
+ data = httptools.downloadpage(url).data
+ data = re.sub(r'"|\n|\r|\t| |
|\s{2,}', "", data)
+ return data
+
+def lista (item):
+ logger.info ()
+ itemlist = []
+ infoLabels = dict()
+ data = get_source(item.url)
+ patron = "