@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<addon id="plugin.video.kod" name="Kodi on Demand" version="0.2" provider-name="KOD Team">
|
||||
<addon id="plugin.video.kod" name="Kodi on Demand" version="0.3" provider-name="KOD Team">
|
||||
<requires>
|
||||
<import addon="xbmc.python" version="2.1.0"/>
|
||||
<import addon="script.module.libtorrent" optional="true"/>
|
||||
|
||||
52
channels.json
Normal file
52
channels.json
Normal file
@@ -0,0 +1,52 @@
|
||||
{
|
||||
"altadefinizione01_club": "https://www.altadefinizione01.cc",
|
||||
"altadefinizione01_link": "http://altadefinizione01.link",
|
||||
"altadefinizione01": "https://altadefinizione01.to",
|
||||
"altadefinizioneclick": "https://altadefinizione.cloud",
|
||||
|
||||
"altadefinizioneclub": "https://altadefinizione.cloud",
|
||||
"altadefinizionehd": "https://altadefinizionehd.org",
|
||||
"animeforge": "https://ww1.animeforce.org",
|
||||
"animeleggendari": "https://animepertutti.com",
|
||||
"animestream": "https://www.animeworld.it",
|
||||
"animesubita": "http://www.animesubita.org",
|
||||
"animetubeita": "http://www.animetubeita.com",
|
||||
"animevision": "https://www.animevision.it",
|
||||
"animeworld": "https://www.animeworld.it",
|
||||
"asiansubita": "http://asiansubita.altervista.org",
|
||||
"casacinema": "https://www.casacinema.site",
|
||||
"cb01anime": "http://www.cineblog01.ink/anime/",
|
||||
"cineblog01": "https://cb01.tools",
|
||||
"documentaristreamingdb": "https://documentari-streaming-da.com",
|
||||
"downloadme": "https://www.downloadme.gratis",
|
||||
"dragonballforever": "https://www.dragonballforever.it",
|
||||
"dreamsub": "https://www.dreamsub.stream",
|
||||
"eurostreaming": "https://eurostreaming.gratis",
|
||||
"eurostreaming_video": "https://www.eurostreaming.best",
|
||||
"fastsubita": "http://fastsubita.com",
|
||||
"ffilms":"https://ffilms.org",
|
||||
"filmgratis": "https://www.filmaltadefinizione.net",
|
||||
"filmontv": "https://www.comingsoon.it",
|
||||
"filmpertutti": "https://www.filmpertutti.tube",
|
||||
"filmsenzalimiti_blue": "https://filmsenzalimiti.best",
|
||||
"filmsenzalimiti_info": "https://www.filmsenzalimiti.host",
|
||||
"filmstreaming01": "https://filmstreaming01.com",
|
||||
"filmstreamingita": "http://filmstreamingita.live",
|
||||
"guarda_serie": "https://guardaserie.site",
|
||||
"guardafilm": "http://www.guardafilm.top",
|
||||
"guardaserie_stream": "https://guardaserie.co",
|
||||
"guardaserieonline": "http://www.guardaserie.media",
|
||||
"guardogratis": "http://guardogratis.io",
|
||||
"ilgeniodellostreaming": "https://ilgeniodellostreaming.pw",
|
||||
"italiaserie": "https://italiaserie.org",
|
||||
"italiafilm": "https://www.italia-film.pw",
|
||||
"italiafilmvedohd": "https://italiafilm.info",
|
||||
"italiaserie_uno": "https:://italiaserie.org",
|
||||
"majintoon": "https://toonitalia.org",
|
||||
"mondoserietv": "https://mondoserietv.com",
|
||||
"piratestreaming": "https://www.piratestreaming.watch",
|
||||
"seriehd": "https://www.seriehd.info",
|
||||
"serietvonline": "https://serietvonline.xyz",
|
||||
"serietvu": "https://www.serietvu.club",
|
||||
"tantifilm": "https://www.tantifilm.plus"
|
||||
}
|
||||
@@ -9,7 +9,10 @@ from platformcode import logger, config
|
||||
from specials import autoplay
|
||||
|
||||
#URL che reindirizza sempre al dominio corrente
|
||||
host = "https://altadefinizione01.to"
|
||||
#host = "https://altadefinizione01.to"
|
||||
|
||||
__channel__ = "altadefinizione01"
|
||||
host = config.get_addon_version(__channel__)
|
||||
|
||||
IDIOMAS = {'Italiano': 'IT'}
|
||||
list_language = IDIOMAS.values()
|
||||
|
||||
@@ -12,10 +12,7 @@ from platformcode import config, logger
|
||||
from specials import autoplay, filtertools
|
||||
|
||||
__channel__ = "altadefinizione01_club"
|
||||
|
||||
#host = "https://www.altadefinizione01.club/" # host da cambiare
|
||||
#host = "https://www.altadefinizione01.team/" #aggiornato al 22 marzo 2019
|
||||
host = "https://www.altadefinizione01.vision/" #aggiornato al 30-04-209
|
||||
host = config.get_channel_url(__channel__)
|
||||
|
||||
# ======== Funzionalità =============================
|
||||
|
||||
|
||||
@@ -13,19 +13,13 @@ from platformcode import config, logger
|
||||
|
||||
__channel__ = "altadefinizione01_link"
|
||||
|
||||
#host = "https://altadefinizione01.link/" #riaggiornato al 29 aprile 2019
|
||||
#host = "http://altadefinizione01.art/" # aggiornato al 22 marzo 2019
|
||||
#host = "https://altadefinizione01.network/" #aggiornato al 22 marzo 2019
|
||||
#host = "http://altadefinizione01.date/" #aggiornato al 3 maggio 2019
|
||||
#host = "https://altadefinizione01.voto/" #aggiornato al 3 maggio 2019
|
||||
#host = "https://altadefinizione01.estate/" # aggiornato al 23 maggio 2019
|
||||
|
||||
# ======== def per utility INIZIO ============================
|
||||
|
||||
list_servers = ['supervideo', 'streamcherry','rapidvideo', 'streamango', 'openload']
|
||||
list_quality = ['default']
|
||||
|
||||
host = config.get_setting("channel_host", __channel__)
|
||||
#host = config.get_setting("channel_host", __channel__)
|
||||
host = config.get_channel_url(__channel__)
|
||||
checklinks = config.get_setting('checklinks', __channel__)
|
||||
checklinks_number = config.get_setting('checklinks_number', __channel__)
|
||||
|
||||
|
||||
@@ -10,7 +10,9 @@ from core.item import Item
|
||||
from platformcode import logger, config
|
||||
from specials import autoplay
|
||||
|
||||
host = config.get_setting("channel_host", 'altadefinizioneclick')
|
||||
#host = config.get_setting("channel_host", 'altadefinizioneclick')
|
||||
__channel__ = 'altadefinizioneclick'
|
||||
host = config.get_channel_url(__channel__)
|
||||
|
||||
IDIOMAS = {'Italiano': 'IT'}
|
||||
list_language = IDIOMAS.values()
|
||||
@@ -29,7 +31,7 @@ def mainlist(item):
|
||||
support.menu(itemlist, 'Film', 'peliculas', host + "/nuove-uscite/")
|
||||
support.menu(itemlist, 'Per Genere submenu', 'menu', host, args='Film')
|
||||
support.menu(itemlist, 'Per Anno submenu', 'menu', host, args='Anno')
|
||||
support.menu(itemlist, 'Sub-IIA', 'peliculas', host + "/sub-ita/")
|
||||
support.menu(itemlist, 'Sub-ITA', 'peliculas', host + "/sub-ita/")
|
||||
support.menu(itemlist, 'Cerca...', 'search', host, 'movie')
|
||||
support.aplay(item, itemlist,list_servers, list_quality)
|
||||
support.channel_config(item, itemlist)
|
||||
|
||||
@@ -28,8 +28,8 @@ def mainlist(item):
|
||||
|
||||
itemlist =[]
|
||||
|
||||
support.menu(itemlist, 'ITA submenu', 'build_menu', host + '/filter?', args=["anime", 'language[]=1'])
|
||||
support.menu(itemlist, 'Sub-ITA submenu', 'build_menu', host + '/filter?', args=["anime", 'language[]=0'])
|
||||
support.menu(itemlist, 'ITA submenu bold', 'build_menu', host + '/filter?', args=["anime", 'language[]=1'])
|
||||
support.menu(itemlist, 'Sub-ITA submenu bold', 'build_menu', host + '/filter?', args=["anime", 'language[]=0'])
|
||||
support.menu(itemlist, 'Archivio A-Z submenu', 'alfabetico', host+'/az-list', args=["tvshow","a-z"])
|
||||
support.menu(itemlist, 'In corso submenu', 'video', host+'/', args=["in sala"])
|
||||
support.menu(itemlist, 'Generi submenu', 'generi', host+'/')
|
||||
|
||||
@@ -191,7 +191,7 @@ def peliculas_serie(item):
|
||||
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
|
||||
patron = r'div class="cnt">.*?src="(.*?)".*?title="([A-Z|0-9].*?)".*?<a href="(.*?)"'
|
||||
patron = r'div class="cnt">[^s]+src="([^"]+).*?small>\s+[^A-Z](.*?)<.*?<a href="([^"]+)'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
for scrapedthumb, scrapedtitle, scrapedurl in matches:
|
||||
|
||||
@@ -95,6 +95,7 @@ def cleantitle(scrapedtitle):
|
||||
|
||||
# ================================================================================================================
|
||||
# ----------------------------------------------------------------------------------------------------------------
|
||||
|
||||
def nuoveserie(item):
|
||||
log()
|
||||
itemlist = []
|
||||
@@ -109,8 +110,26 @@ def nuoveserie(item):
|
||||
else:
|
||||
patron_block = r'<div class="container container-title-serie-new container-scheda" meta-slug="new">(.*?)</div></div><div'
|
||||
|
||||
patron = r'<a href="([^"]+)".*?>\s<img\s.*?src="([^"]+)" />[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>([^<]+)</p>'
|
||||
return support.scrape(item, patron, ['url', 'thumb', 'title'], patron_block=patron_block, action='episodios')
|
||||
patron = r'<a href="([^"]+)".*?><img\s.*?src="([^"]+)" \/>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>([^<]+)<\/p>'
|
||||
|
||||
matches = support.match(item, patron, patron_block, headers)[0]
|
||||
|
||||
for scrapedurl, scrapedthumbnail, scrapedtitle in matches:
|
||||
scrapedtitle = cleantitle(scrapedtitle)
|
||||
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="episodios",
|
||||
contentType="episode",
|
||||
title=scrapedtitle,
|
||||
fulltitle=scrapedtitle,
|
||||
url=scrapedurl,
|
||||
show=scrapedtitle,
|
||||
thumbnail=scrapedthumbnail,
|
||||
folder=True))
|
||||
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
return itemlist
|
||||
|
||||
|
||||
# ================================================================================================================
|
||||
@@ -121,9 +140,45 @@ def serietvaggiornate(item):
|
||||
itemlist = []
|
||||
|
||||
patron_block = r'<div class="container\s*container-title-serie-lastep\s*container-scheda" meta-slug="lastep">(.*?)<\/div><\/div><div'
|
||||
patron = r'<a rel="nofollow" href="([^"]+)"[^>]+> <img.*?src="([^"]+)"[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>([^(?:<|\()]+)(?:\(([^\)]+)\))?[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>([^<]+)<[^>]+>'
|
||||
patron = r'<a rel="nofollow"\s*href="([^"]+)"[^>]+><img.*?src="([^"]+)"[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>([^<]+)<[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>([^<]+)<[^>]+>'
|
||||
|
||||
return support.scrape(item, patron, ['url', 'thumb', 'episode', 'lang', 'title'], patron_block=patron_block, action='findvideos')
|
||||
matches = support.match(item, patron, patron_block, headers)[0]
|
||||
|
||||
for scrapedurl, scrapedthumbnail, scrapedep, scrapedtitle in matches:
|
||||
episode = re.compile(r'^(\d+)x(\d+)', re.DOTALL).findall(scrapedep) # Prendo stagione ed episodioso
|
||||
scrapedtitle = cleantitle(scrapedtitle)
|
||||
|
||||
contentlanguage = ""
|
||||
if 'sub-ita' in scrapedep.strip().lower():
|
||||
contentlanguage = 'Sub-ITA'
|
||||
|
||||
extra = r'<span\s.*?meta-stag="%s" meta-ep="%s" meta-embed="([^"]+)"\s.*?embed2="([^"]+)?"\s.*?embed3="([^"]+)?"[^>]*>' % (
|
||||
episode[0][0], episode[0][1].lstrip("0"))
|
||||
|
||||
infoLabels = {}
|
||||
infoLabels['episode'] = episode[0][1].zfill(2)
|
||||
infoLabels['season'] = episode[0][0]
|
||||
|
||||
title = str(
|
||||
"%s - %sx%s %s" % (scrapedtitle, infoLabels['season'], infoLabels['episode'], contentlanguage)).strip()
|
||||
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="findepvideos",
|
||||
contentType="episode",
|
||||
title=title,
|
||||
show=scrapedtitle,
|
||||
fulltitle=scrapedtitle,
|
||||
url=scrapedurl,
|
||||
extra=extra,
|
||||
thumbnail=scrapedthumbnail,
|
||||
contentLanguage=contentlanguage,
|
||||
infoLabels=infoLabels,
|
||||
folder=True))
|
||||
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
# ================================================================================================================
|
||||
|
||||
65
channels/mondolunatico2.json
Normal file
65
channels/mondolunatico2.json
Normal file
@@ -0,0 +1,65 @@
|
||||
{
|
||||
"id": "mondolunatico2",
|
||||
"name": "MondoLunatico 2.0",
|
||||
"language": ["ita"],
|
||||
"active": true,
|
||||
"adult": false,
|
||||
"thumbnail": "mondolunatico2.png",
|
||||
"banner": "mondolunatico2.png",
|
||||
"categories": ["tvshow", "movie", "vosi", "anime"],
|
||||
"settings": [
|
||||
{
|
||||
"id": "include_in_global_search",
|
||||
"type": "bool",
|
||||
"label": "Includi in Ricerca Globale",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_peliculas",
|
||||
"type": "bool",
|
||||
"label": "Includi in Novità - Film",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_italiano",
|
||||
"type": "bool",
|
||||
"label": "Includi in Novità - Italiano",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "comprueba_enlaces",
|
||||
"type": "bool",
|
||||
"label": "Verifica se i link esistono",
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "comprueba_enlaces_num",
|
||||
"type": "list",
|
||||
"label": "Numero di link da verificare",
|
||||
"default": 1,
|
||||
"enabled": true,
|
||||
"visible": "eq(-1,true)",
|
||||
"lvalues": [ "5", "10", "15", "20" ]
|
||||
},
|
||||
{
|
||||
"id": "filter_languages",
|
||||
"type": "list",
|
||||
"label": "Mostra link in lingua...",
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"visible": true,
|
||||
"lvalues": [
|
||||
"No filtrar",
|
||||
"Italiano"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
500
channels/mondolunatico2.py
Normal file
500
channels/mondolunatico2.py
Normal file
@@ -0,0 +1,500 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# ------------------------------------------------------------
|
||||
# Canale per MondoLunatico 2.0
|
||||
# ------------------------------------------------------------
|
||||
|
||||
import re
|
||||
import urlparse
|
||||
import urllib
|
||||
import urllib2
|
||||
import time
|
||||
|
||||
from channelselector import thumb
|
||||
from specials import autoplay, filtertools
|
||||
from core import scrapertools, httptools, tmdb, servertools, support, scrapertoolsV2
|
||||
from core.item import Item
|
||||
from platformcode import logger, config, platformtools
|
||||
|
||||
channel = "mondolunatico2"
|
||||
host = "https://mondolunatico.org/stream/"
|
||||
headers = [['Referer', host]]
|
||||
|
||||
list_servers = ['verystream', 'wstream', 'openload', 'streamango']
|
||||
list_quality = ['HD', 'default']
|
||||
|
||||
def mainlist(item):
|
||||
|
||||
# Main options
|
||||
itemlist = []
|
||||
support.menu(itemlist, 'Novità bold', 'carousel', host, contentType='movie', args='movies')
|
||||
support.menu(itemlist, 'Sub ITA bold', 'carousel_subita', host, contentType='movie', args='movies')
|
||||
support.menu(itemlist, 'Ultime Richieste Inserite bold', 'carousel_request', host, contentType='movie', args='movies')
|
||||
support.menu(itemlist, 'Film Nelle Sale bold', 'carousel_cinema', host, contentType='movie', args='movies')
|
||||
support.menu(itemlist, 'Film Ultimi Inseriti submenu', 'carousel_last', host, contentType='movie', args='movies')
|
||||
support.menu(itemlist, 'Film Top ImDb submenu', 'top_imdb', host + 'top-imdb/', contentType='movie', args='movies')
|
||||
support.menu(itemlist, 'Serie TV', 'carousel_episodes', host, contentType='episode', args='tvshows')
|
||||
support.menu(itemlist, 'Serie TV Top ImDb submenu', 'top_serie', host + 'top-imdb/', contentType='episode', args='tvshows')
|
||||
support.menu(itemlist, '[COLOR blue]Cerca...[/COLOR] bold', 'search', host)
|
||||
autoplay.init(item.channel, list_servers, list_quality)
|
||||
autoplay.show_option(item.channel, itemlist)
|
||||
|
||||
return itemlist
|
||||
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
def carousel(item, regex=r'<h2>Ultime Richieste Inserite</h2>(.*?)<header>', contentType="movie"):
|
||||
logger.info("[mondolunatico2.py] carousel")
|
||||
itemlist = []
|
||||
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
|
||||
block = scrapertools.find_single_match(data,regex)
|
||||
|
||||
patron = r'<article id.*?src="([^"]+).*?alt="([^"]+).*?href="([^"]+).*?,.([^<]+)'
|
||||
matches = re.compile(patron, re.DOTALL).findall(block)
|
||||
|
||||
for scrapedthumbnail, scrapedtitle, scrapedurl, year in matches:
|
||||
scrapedtitle = scrapertools.decodeHtmlentities(scrapedtitle)
|
||||
scrapedtitle = re.sub(r'[0-9]{4}', "", scrapedtitle)
|
||||
itemlist.append(
|
||||
Item(channel=channel,
|
||||
action="findvideos",
|
||||
contentType=contentType,
|
||||
title=scrapedtitle + " " + "[COLOR orange][" + year + "][/COLOR]",
|
||||
fulltitle=scrapedtitle,
|
||||
url=scrapedurl,
|
||||
show=scrapedtitle,
|
||||
args=item.args,
|
||||
infoLabels={'year': year},
|
||||
thumbnail=scrapedthumbnail))
|
||||
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
|
||||
return itemlist
|
||||
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
def carousel_subita(item):
|
||||
return carousel(item, regex=r'<h2>Film SubITA</h2>(.*?)<header>', contentType="movie")
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
def carousel_request(item):
|
||||
return carousel(item, regex=r'<h2>Ultime Richieste Inserite</h2>(.*?)<header>', contentType="movie")
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
def carousel_cinema(item):
|
||||
return carousel(item, regex=r'<h2>Nelle Sale</h2>(.*?)<header>', contentType="movie")
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
def carousel_last(item):
|
||||
return carousel(item, regex=r'<h2>Ultimi Film Inseriti</h2>(.*?)<header>', contentType="movie")
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
def carousel_episodes(item):
|
||||
return carousel(item, regex=r'<h2>Serie TV</h2>(.*?)<header>', contentType="episode")
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
def top_imdb(item, contentType='movie', regex=r'<h1.*?TOP IMDb.*?<h3>(.*?)<h3>'):
|
||||
logger.info("[mondolunatico2.py] top_imdb")
|
||||
itemlist = []
|
||||
|
||||
minpage = 20
|
||||
p = 1
|
||||
if '{}' in item.url:
|
||||
item.url, p = item.url.split('{}')
|
||||
p = int(p)
|
||||
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
|
||||
block = scrapertools.find_single_match(data, regex)
|
||||
|
||||
patron = r"<div class='image'><div class='[^']+'><a href='([^']+)'[^']+'([^']+)'[^']+'([^']+)"
|
||||
matches = re.compile(patron, re.DOTALL).findall(block)
|
||||
|
||||
for i, (scrapedurl, scrapedthumbnail, scrapedtitle) in enumerate(matches):
|
||||
if (p - 1) * minpage > i: continue
|
||||
if i >= p * minpage: break
|
||||
scrapedtitle = scrapertools.decodeHtmlentities(scrapedtitle)
|
||||
scrapedtitle = re.sub(r'[0-9]{4}', "", scrapedtitle)
|
||||
scrapedthumbnail = scrapedthumbnail.replace ("-90x135","").replace("/w92/", "/w600_and_h900_bestv2/")
|
||||
itemlist.append(
|
||||
Item(channel=channel,
|
||||
action="findvideos" if "movie" in contentType else "episodios",
|
||||
contentType=item.contentType,
|
||||
contentTitle=scrapedtitle,
|
||||
title=scrapedtitle,
|
||||
fulltitle=scrapedtitle,
|
||||
url=scrapedurl,
|
||||
show=scrapedtitle,
|
||||
thumbnail=scrapedthumbnail,
|
||||
args=item.args))
|
||||
|
||||
if len(matches) >= p * minpage:
|
||||
thumbnail = thumb(itemlist=[])
|
||||
scrapedurl = item.url + '{}' + str(p + 1)
|
||||
itemlist.append(
|
||||
Item(channel=channel,
|
||||
contentType=item.contentType,
|
||||
action="top_imdb",
|
||||
title="[COLOR blue][B]Successivo >[/B][/COLOR]",
|
||||
thumbnail=thumbnail,
|
||||
url=scrapedurl))
|
||||
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
|
||||
return itemlist
|
||||
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
def top_serie(item):
|
||||
return top_imdb(item, contentType='episode', regex=r'<h3>TVShows</h3>(.*?)<div class="sidebar scrolling">')
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
def search(item, texto):
|
||||
logger.info("[mondolunatico2.py] " + item.url + " search " + texto)
|
||||
item.url = host + "?s=" + texto
|
||||
|
||||
try:
|
||||
return peliculas(item)
|
||||
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
logger.error("%s" % line)
|
||||
return []
|
||||
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
def peliculas(item):
|
||||
logger.info("[mondolunatico2.py] peliculas")
|
||||
itemlist = []
|
||||
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
|
||||
patron = r'<div class="result-item">.*?<a href="([^"]+).*?src="([^"]+).*?alt="([^"]+).*?span class="([^"]+).*?<span class="year">([^<]+).*?<p>([^<]+)'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
for scrapedurl, scrapedthumbnail, scrapedtitle, args, year, scrapedplot in matches:
|
||||
scrapedtitle = scrapertools.decodeHtmlentities(scrapedtitle)
|
||||
scrapedtitle = re.sub(r'[0-9]{4}', "", scrapedtitle)
|
||||
type = "[COLOR aqua][Serie][/COLOR]" if "tvshows" in item.args else "[COLOR aqua][Film][/COLOR]"
|
||||
itemlist.append(
|
||||
Item(channel=channel,
|
||||
action="episodios" if "tvshows" in item.args else "findvideos",
|
||||
contentType="episode" if "tvshows" in item.args else "movie",
|
||||
title=scrapedtitle + " " + "[COLOR orange][" + year + "][/COLOR]" + " " + type,
|
||||
fulltitle=scrapedtitle,
|
||||
thumbnail=scrapedthumbnail,
|
||||
url=scrapedurl,
|
||||
show=scrapedtitle,
|
||||
args=args,
|
||||
infoLabels={'year':year},
|
||||
plot=scrapedplot))
|
||||
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
return itemlist
|
||||
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
def findvideos(item):
|
||||
logger.info("[mondolunatico2.py] findvideos")
|
||||
|
||||
if item.args == "tvshows":
|
||||
ret=support.dooplay_get_links(item, host)
|
||||
|
||||
if ret == []:
|
||||
return episodios(item)
|
||||
else:
|
||||
item.url = ret[0]["url"]
|
||||
return videoplayer(item)
|
||||
|
||||
if item.args == "movies" or "movie":
|
||||
return videoplayer(item)
|
||||
|
||||
else:
|
||||
return halfplayer(item)
|
||||
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
def episodios(item):
|
||||
logger.info("[mondolunatico2.py] episodios")
|
||||
itemlist = []
|
||||
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
|
||||
if "<h2>Stagioni ed Episodi</h2>" in data:
|
||||
# Se è presente direttamente la lista Stagioni con i relativi episodi
|
||||
block = scrapertools.find_single_match(data, r'<h2>Stagioni ed Episodi</h2>(.*?)<div class=\'sbox\'>')
|
||||
patron = r'episodiotitle.*?href=\'([^\']+)\'>([^<]+)'
|
||||
matches = re.compile(patron, re.DOTALL).findall(block)
|
||||
for scrapedurl, scrapedtitle in matches:
|
||||
itemlist.append(
|
||||
Item(channel=channel,
|
||||
action="videoplayer",
|
||||
contentType=item.contentType,
|
||||
title=scrapedtitle,
|
||||
thumbnail=item.thumbnail,
|
||||
fulltitle=scrapedtitle,
|
||||
url=scrapedurl,
|
||||
args=item.args,
|
||||
show=item.show))
|
||||
support.videolibrary(itemlist, item, 'color kod')
|
||||
return itemlist
|
||||
|
||||
if "File Unico..." in data:
|
||||
#Se è direttamente un file unico
|
||||
return dooplayer(item)
|
||||
|
||||
if "http://mondolunatico.org/stream/wp-content/uploads/2017/08/hand.gif" in data:
|
||||
# Keeplinks
|
||||
return keeplink(item)
|
||||
|
||||
else:
|
||||
# Se nella lista è presente Dooplayer con elenco episodi
|
||||
patron = r'<div class="sp-head" title="Espandi">([^<]+).*?<iframe.*?src="([^"]+)'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
if len(matches) > 1:
|
||||
for scrapedtitle, scrapedurl in matches:
|
||||
itemlist.append(
|
||||
Item(channel=channel,
|
||||
action="player_list",
|
||||
contentType=item.contentType,
|
||||
title=scrapedtitle,
|
||||
thumbnail=item.thumbnail,
|
||||
fulltitle=scrapedtitle,
|
||||
url=scrapedurl,
|
||||
show=item.show))
|
||||
return itemlist
|
||||
else:
|
||||
return dooplayer(item)
|
||||
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
def player(item):
|
||||
logger.info ("[mondolunatico2.py] player")
|
||||
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
|
||||
item.url = scrapertools.find_single_match(item.url, r'([^/]+//[^/]+/[^/]+/[^/]+)')
|
||||
|
||||
if "https://mondolunatico.tk" in data:
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
link = scrapertools.find_single_match(data, r'<p><iframe src="(.*?/.*?)[A-Z]')
|
||||
item.url = link
|
||||
return halfplayer(item)
|
||||
|
||||
if "mondolunatico.tk" in item.url:
|
||||
return halfplayer(item)
|
||||
|
||||
#Scarica il link del video integrato nella pagina
|
||||
ret=support.dooplay_get_links(item, host)
|
||||
|
||||
#Prelevo il link del video integrato
|
||||
url = ret[0]["url"]
|
||||
|
||||
data = httptools.downloadpage(url, headers=headers).data
|
||||
|
||||
if "zmdi zmdi-playlist-audio zmdi-hc-3x" in data:
|
||||
return player_list(item)
|
||||
|
||||
else:
|
||||
#Correggo il link con il lin del POST
|
||||
url = url.replace("/v/", "/api/source/").replace("/p/", "/api/source/")
|
||||
|
||||
postData = urllib.urlencode({
|
||||
"r": "",
|
||||
"d": "modolunatico.tk",
|
||||
})
|
||||
|
||||
block = httptools.downloadpage(url, post=postData).data
|
||||
|
||||
patron = r'"file":".*?\/(r[^"]+)'
|
||||
matches = re.compile(patron, re.DOTALL).findall(block)
|
||||
|
||||
itemlist = []
|
||||
|
||||
for scrapedurl in matches:
|
||||
scrapedurl = "https://fvs.io/" + scrapedurl
|
||||
itemlist.append(
|
||||
Item(channel=channel,
|
||||
action="play",
|
||||
contentType=item.contentType,
|
||||
title=item.title,
|
||||
thumbnail=item.thumbnail,
|
||||
fulltitle=item.title,
|
||||
url=scrapedurl,
|
||||
show=item.show))
|
||||
|
||||
autoplay.start(itemlist, item)
|
||||
|
||||
return itemlist
|
||||
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
def player_list(item):
|
||||
itemlist = []
|
||||
|
||||
# Scarico la pagina
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
|
||||
if "panel_toggle toggleable" in data:
|
||||
# Prelevo il blocco lista puntate
|
||||
block = scrapertools.find_single_match(data, r'panel_toggle toggleable.*?(<div.*?)<!-- Javascript -->')
|
||||
|
||||
patron = r'data-url="([^"]+)">.*?([A-Z].*?) '
|
||||
matches = re.compile(patron, re.DOTALL).findall(block)
|
||||
|
||||
for scrapedurl, scrapedtitle in matches:
|
||||
scrapedtitle = re.sub('mp4|avi|mkv', '', scrapedtitle)
|
||||
scrapedtitle = re.sub('WebRip|WEBRip|x264|AC3|1080p|DLMux|XviD-|BDRip|BluRay|HD|WEBMux|H264|BDMux|720p|TV|NFMux|DVDRip|DivX|DVDip|Ac3|Dvdrip|Mux|NovaRip|DVD|SAT|Divx', '', scrapedtitle)
|
||||
scrapedtitle = re.sub('ITA|ENG|Italian|SubITA|SUBITA|iTALiAN|LiAN|Ita', '', scrapedtitle)
|
||||
scrapedtitle = re.sub('Pir8|UBi|M L|BEDLAM|REPACK|DD5.1|bloody|SVU', '', scrapedtitle)
|
||||
scrapedtitle = scrapedtitle.replace(".", " ").replace(" - ", " ").replace(" -", "").replace(" ", "")
|
||||
itemlist.append(
|
||||
Item(channel=channel,
|
||||
action="halfplayer",
|
||||
contentType=item.contentType,
|
||||
title=scrapedtitle,
|
||||
thumbnail=item.thumbnail,
|
||||
fulltitle=scrapedtitle,
|
||||
url="https://mondolunatico.tk" + scrapedurl,
|
||||
show=item.show))
|
||||
|
||||
support.videolibrary(itemlist, item, 'color kod')
|
||||
|
||||
return itemlist
|
||||
|
||||
else:
|
||||
return player(item)
|
||||
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
def dooplayer(item):
|
||||
logger.info ("[mondolunatico2.py] dooplayer")
|
||||
itemlist = []
|
||||
|
||||
url = item.url
|
||||
data = httptools.downloadpage(url, headers=headers).data
|
||||
|
||||
link= scrapertools.find_single_match(data, r'(https://mondolunatico.tk/./[^"]+)')
|
||||
|
||||
data = httptools.downloadpage(link, headers=headers).data
|
||||
if "panel_toggle toggleable" in data:
|
||||
item.url = link
|
||||
return player_list(item)
|
||||
|
||||
# Correggo il link con il lin del POST
|
||||
link1 = link.replace("/v/", "/api/source/").replace("/p/", "/api/source/")
|
||||
|
||||
postData = urllib.urlencode({
|
||||
"r": link,
|
||||
"d": "modolunatico.tk",
|
||||
})
|
||||
|
||||
block = httptools.downloadpage(link1, post=postData).data
|
||||
|
||||
patron = r'"file":".*?\/(r[^"]+)'
|
||||
matches = re.compile(patron, re.DOTALL).findall(block)
|
||||
|
||||
for scrapedurl in matches:
|
||||
scrapedurl = "https://fvs.io/" + scrapedurl
|
||||
itemlist.append(
|
||||
Item(channel=channel,
|
||||
action="play",
|
||||
contentType=item.contentType,
|
||||
title=item.title,
|
||||
thumbnail=item.thumbnail,
|
||||
fulltitle=item.title,
|
||||
url=scrapedurl,
|
||||
show=item.show))
|
||||
|
||||
autoplay.start(itemlist, item)
|
||||
support.videolibrary(itemlist, item, 'color kod')
|
||||
|
||||
return itemlist
|
||||
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
def keeplink(item):
|
||||
itemlist = []
|
||||
|
||||
# Scarico la pagina
|
||||
data = httptools.downloadpage(item.url).data
|
||||
|
||||
# Prendo url keeplink
|
||||
patron = 'href="(https?://www\.keeplinks\.(?:co|eu)/p92/([^"]+))"'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
for keeplinks, id in matches:
|
||||
headers = [['Cookie', 'flag[' + id + ']=1; defaults=1; nopopatall=' + str(int(time.time()))],
|
||||
['Referer', keeplinks]]
|
||||
|
||||
html = httptools.downloadpage(keeplinks, headers=headers).data
|
||||
data += str(scrapertools.find_multiple_matches(html, '</lable><a href="([^"]+)" target="_blank"'))
|
||||
|
||||
patron = 'src="([^"]+)" frameborder="0"'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
for scrapedurl in matches:
|
||||
data += httptools.downloadpage(scrapedurl).data
|
||||
|
||||
for videoitem in servertools.find_video_items(data=data):
|
||||
videoitem.title = item.title + " - " + videoitem.title
|
||||
videoitem.fulltitle = item.fulltitle
|
||||
videoitem.thumbnail = item.thumbnail
|
||||
videoitem.show = item.show
|
||||
videoitem.plot = item.plot
|
||||
videoitem.channel = item.channel
|
||||
itemlist.append(videoitem)
|
||||
|
||||
return itemlist
|
||||
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
def videoplayer(item):
|
||||
logger.info("[mondolunatico2.py] videoplayer")
|
||||
itemlist = []
|
||||
|
||||
for link in support.dooplay_get_links(item, host):
|
||||
server = link['server'][:link['server'].find(".")]
|
||||
if server == "":
|
||||
server = "mondolunatico"
|
||||
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="player" if "mondolunatico" in server else "play",
|
||||
title=server + " [COLOR blue][" + link['title'] + "][/COLOR]",
|
||||
url=link['url'],
|
||||
server=server,
|
||||
fulltitle=item.fulltitle,
|
||||
thumbnail=item.thumbnail,
|
||||
show=item.show,
|
||||
quality=link['title'],
|
||||
contentType=item.contentType,
|
||||
folder=False))
|
||||
|
||||
support.videolibrary(itemlist, item, 'color kod', function_level=2)
|
||||
|
||||
autoplay.start(itemlist, item)
|
||||
|
||||
return itemlist
|
||||
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
def halfplayer(item):
|
||||
logger.info("[mondolunatico2.py] halfplayer")
|
||||
|
||||
url=item.url
|
||||
|
||||
# Correggo il link con il lin del POST
|
||||
url = url.replace("/v/", "/api/source/").replace("/p/", "/api/source/")
|
||||
|
||||
postData = urllib.urlencode({
|
||||
"r": "",
|
||||
"d": "modolunatico.tk",
|
||||
})
|
||||
|
||||
block = httptools.downloadpage(url, post=postData).data
|
||||
|
||||
patron = r'"file":".*?\/(r[^"]+)'
|
||||
matches = re.compile(patron, re.DOTALL).findall(block)
|
||||
|
||||
for scrapedurl in matches:
|
||||
item.url = "https://fvs.io/" + scrapedurl
|
||||
item.server = ""
|
||||
itemlist = platformtools.play_video(item, force_direct=True, autoplay=True)
|
||||
|
||||
return itemlist
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
import re
|
||||
|
||||
from core import scrapertools, httptools, tmdb, support
|
||||
from core import scrapertools, httptools, tmdb, support, servertools
|
||||
from core.item import Item
|
||||
from platformcode import logger
|
||||
from specials import autoplay
|
||||
@@ -84,6 +84,7 @@ def insert(item):
|
||||
folder=True))
|
||||
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
|
||||
return itemlist
|
||||
|
||||
#----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
@@ -253,30 +254,58 @@ def episodios(item):
|
||||
patron = r'<br /> <a href="([^"]+)"\s*target="_blank"\s*rel[^>]+>([^<]+)</a>'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
for scrapedurl, scrapedtitle in matches:
|
||||
if 'Wikipedia' not in scrapedurl:
|
||||
scrapedtitle = scrapertools.decodeHtmlentities(scrapedtitle).replace("×", "x")
|
||||
scrapedtitle = scrapedtitle.replace("_", " ")
|
||||
scrapedtitle = scrapedtitle.replace(".mp4", "")
|
||||
# puntata = scrapertools.find_single_match(scrapedtitle, '[0-9]+x[0-9]+')
|
||||
puntata = scrapedtitle
|
||||
for i in itemlist:
|
||||
if i.args == puntata: #è già stata aggiunta
|
||||
i.url += " " + scrapedurl
|
||||
break
|
||||
if "https://vcrypt.net" in data:
|
||||
patron = r'(?:<p>|<br />)([^<]+)<a href="([^"]+)'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
else:
|
||||
itemlist.append(
|
||||
Item(channel=channel,
|
||||
action="findvideos",
|
||||
contentType=item.contentType,
|
||||
title="[COLOR azure]" + scrapedtitle + "[/COLOR]",
|
||||
thumbnail=item.thumbnail,
|
||||
fulltitle=scrapedtitle,
|
||||
url=scrapedurl,
|
||||
args = puntata,
|
||||
show=item.show,
|
||||
plot=item.plot))
|
||||
for scrapedtitle, scrapedurl in matches:
|
||||
if 'Wikipedia' not in scrapedurl:
|
||||
scrapedtitle = scrapertools.decodeHtmlentities(scrapedtitle).replace("×", "x")
|
||||
scrapedtitle = scrapedtitle.replace("_", " ")
|
||||
scrapedtitle = scrapedtitle.replace(".mp4", "")
|
||||
puntata = scrapedtitle
|
||||
for i in itemlist:
|
||||
if i.args == puntata: # è già stata aggiunta
|
||||
i.url += " " + scrapedurl
|
||||
break
|
||||
|
||||
else:
|
||||
itemlist.append(
|
||||
Item(channel=channel,
|
||||
action="findvideos",
|
||||
contentType=item.contentType,
|
||||
title="[COLOR azure]" + scrapedtitle + "[/COLOR]",
|
||||
thumbnail=item.thumbnail,
|
||||
fulltitle=scrapedtitle,
|
||||
url=scrapedurl,
|
||||
args=puntata,
|
||||
show=item.show,
|
||||
plot=item.plot))
|
||||
else:
|
||||
for scrapedurl, scrapedtitle in matches:
|
||||
if 'Wikipedia' not in scrapedurl:
|
||||
scrapedtitle = scrapertools.decodeHtmlentities(scrapedtitle).replace("×", "x")
|
||||
scrapedtitle = scrapedtitle.replace("_", " ")
|
||||
scrapedtitle = scrapedtitle.replace(".mp4", "")
|
||||
# puntata = scrapertools.find_single_match(scrapedtitle, '[0-9]+x[0-9]+')
|
||||
puntata = scrapedtitle
|
||||
for i in itemlist:
|
||||
if i.args == puntata: #è già stata aggiunta
|
||||
i.url += " " + scrapedurl
|
||||
break
|
||||
|
||||
else:
|
||||
itemlist.append(
|
||||
Item(channel=channel,
|
||||
action="findvideos",
|
||||
contentType=item.contentType,
|
||||
title="[COLOR azure]" + scrapedtitle + "[/COLOR]",
|
||||
thumbnail=item.thumbnail,
|
||||
fulltitle=scrapedtitle,
|
||||
url=scrapedurl,
|
||||
args = puntata,
|
||||
show=item.show,
|
||||
plot=item.plot))
|
||||
|
||||
support.videolibrary(itemlist, item, 'color kod')
|
||||
|
||||
|
||||
@@ -470,11 +470,11 @@ def find_and_set_infoLabels(item):
|
||||
|
||||
if item.contentType == "movie":
|
||||
tipo_busqueda = "movie"
|
||||
tipo_contenido = config.get_localized_string(70283)
|
||||
tipo_contenido = config.get_localized_string(60247)
|
||||
title = item.contentTitle
|
||||
else:
|
||||
tipo_busqueda = "tv"
|
||||
tipo_contenido = config.get_localized_string(60245)
|
||||
tipo_contenido = config.get_localized_string(60298)
|
||||
title = item.contentSerieName
|
||||
|
||||
# Si el titulo incluye el (año) se lo quitamos
|
||||
@@ -497,7 +497,7 @@ def find_and_set_infoLabels(item):
|
||||
if len(results) > 1:
|
||||
from platformcode import platformtools
|
||||
tmdb_result = platformtools.show_video_info(results, item=item,
|
||||
caption=config.get_localized_string(60247) %(title, tipo_contenido))
|
||||
caption= tipo_contenido % title)
|
||||
elif len(results) > 0:
|
||||
tmdb_result = results[0]
|
||||
|
||||
|
||||
3
custom_code.json
Normal file
3
custom_code.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"addon_version": "0.3"
|
||||
}
|
||||
@@ -82,6 +82,22 @@ def is_xbmc():
|
||||
def get_videolibrary_support():
|
||||
return True
|
||||
|
||||
def get_channel_url(name):
|
||||
try:
|
||||
try:
|
||||
import json
|
||||
except:
|
||||
import simplejson as json
|
||||
ROOT_DIR = xbmc.translatePath(__settings__.getAddonInfo('Path'))
|
||||
LOCAL_FILE = os.path.join(ROOT_DIR, "channels.json")
|
||||
with open(LOCAL_FILE) as f:
|
||||
data = json.load(f)
|
||||
if data[name] is not None:
|
||||
return data[name]
|
||||
else:
|
||||
return get_setting("channel_host", name)
|
||||
except:
|
||||
return get_setting("channel_host", name)
|
||||
|
||||
def get_system_platform():
|
||||
""" fonction: pour recuperer la platform que xbmc tourne """
|
||||
|
||||
@@ -1070,7 +1070,7 @@ msgid "Full information"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#60247"
|
||||
msgid "[%s]: Select the correct %s"
|
||||
msgid "[%s]: Select the correct movie"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#60248"
|
||||
|
||||
@@ -1070,8 +1070,8 @@ msgid "Full information"
|
||||
msgstr "Informazioni complete"
|
||||
|
||||
msgctxt "#60247"
|
||||
msgid "[%s]: Select the correct %s"
|
||||
msgstr "[%s]: Seleziona la %s corretta"
|
||||
msgid "[%s]: Select the correct movie"
|
||||
msgstr "[%s]: Seleziona il Film corretto"
|
||||
|
||||
msgctxt "#60248"
|
||||
msgid "Login to this page: %s"
|
||||
|
||||
BIN
resources/media/channels/thumb/mondolunatico2.png
Normal file
BIN
resources/media/channels/thumb/mondolunatico2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.7 KiB |
BIN
resources/media/themes/default/thumb_add.png
Normal file
BIN
resources/media/themes/default/thumb_add.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.3 KiB |
@@ -3,70 +3,70 @@
|
||||
<allowoverlays>false</allowoverlays>
|
||||
<controls>
|
||||
<control type="group" id="10001">
|
||||
<posx>240</posx>
|
||||
<posy>110</posy>
|
||||
<width>800</width>
|
||||
<height>500</height>
|
||||
<posx>50</posx>
|
||||
<posy>28</posy>
|
||||
<width>1179</width>
|
||||
<height>663</height>
|
||||
<control type="image">
|
||||
<width>800</width>
|
||||
<height>500</height>
|
||||
<texture>Windows/DialogBack.png</texture>
|
||||
<width>1179</width>
|
||||
<height>663</height>
|
||||
<texture>Shortcut/dialog-bg-solid.png</texture>
|
||||
</control>
|
||||
<control type="image">
|
||||
<!-- <control type="image">
|
||||
<height>40</height>
|
||||
<width>800</width>
|
||||
<texture>Windows/dialogheader.png</texture>
|
||||
</control>
|
||||
</control> -->
|
||||
<control type="label" id="10002">
|
||||
<posy>10</posy>
|
||||
<posx>10</posx>
|
||||
<posy>15</posy>
|
||||
<posx>0</posx>
|
||||
<height>34</height>
|
||||
<width>725</width>
|
||||
<width>1179</width>
|
||||
<font>font12_title</font>
|
||||
<textcolor>0xFFFFA500</textcolor>
|
||||
<shadowcolor>black</shadowcolor>
|
||||
<textcolor>0xFFFFFFFF</textcolor>
|
||||
<!-- <shadowcolor>black</shadowcolor> -->
|
||||
<align>center</align>
|
||||
<aligny>center</aligny>
|
||||
<label>$ADDON[plugin.video.kod 70000]</label>
|
||||
</control>
|
||||
<control type="button" id="10003">
|
||||
<posx>735</posx>
|
||||
<posy>15</posy>
|
||||
<width>50</width>
|
||||
<height>30</height>
|
||||
<posx>1120</posx>
|
||||
<posy>25</posy>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
<texturefocus>Controls/DialogCloseButton-focus.png</texturefocus>
|
||||
<texturenofocus>Controls/DialogCloseButton.png</texturenofocus>
|
||||
</control>
|
||||
<control type="image" id="10004">
|
||||
<posx>11</posx>
|
||||
<posy>41</posy>
|
||||
<width>522</width>
|
||||
<height>444</height>
|
||||
<control type="image" id="10004"> <!-- FANART -->
|
||||
<posx>0</posx>
|
||||
<posy>0</posy>
|
||||
<width>1179</width>
|
||||
<height>663</height>
|
||||
<texture></texture>
|
||||
<colordiffuse>55FFFFFF</colordiffuse>
|
||||
<colordiffuse>33FFFFFF</colordiffuse>
|
||||
</control>
|
||||
<control type="image" id="10005">
|
||||
<posx>535</posx>
|
||||
<posy>41</posy>
|
||||
<width>255</width>
|
||||
<control type="image" id="10005"> <!-- LOCANDINA -->
|
||||
<posx>809</posx>
|
||||
<posy>110</posy>
|
||||
<width>310</width>
|
||||
<height>444</height>
|
||||
<texture></texture>
|
||||
</control>
|
||||
<control type="label" id="10006">
|
||||
<posy>50</posy>
|
||||
<posx>20</posx>
|
||||
<control type="label" id="10006"> <!-- Serie -->
|
||||
<posy>100</posy>
|
||||
<posx>60</posx>
|
||||
<height>40</height>
|
||||
<width>100</width>
|
||||
<font>font10</font>
|
||||
<textcolor>0xFFFFA500</textcolor>
|
||||
<textcolor>0xFFFFFFFF</textcolor>
|
||||
<shadowcolor>black</shadowcolor>
|
||||
<align>posx</align>
|
||||
<aligny>posy</aligny>
|
||||
<label></label>
|
||||
</control>
|
||||
<control type="label" id="10007">
|
||||
<posy>50</posy>
|
||||
<posx>140</posx>
|
||||
<posy>100</posy>
|
||||
<posx>200</posx>
|
||||
<height>40</height>
|
||||
<width>365</width>
|
||||
<font>font10</font>
|
||||
@@ -78,21 +78,21 @@
|
||||
<aligny>posy</aligny>
|
||||
<label></label>
|
||||
</control>
|
||||
<control type="label" id="10008">
|
||||
<posy>70</posy>
|
||||
<posx>20</posx>
|
||||
<control type="label" id="10008"> <!-- Lingua Originale -->
|
||||
<posy>120</posy>
|
||||
<posx>60</posx>
|
||||
<height>40</height>
|
||||
<width>100</width>
|
||||
<font>font10</font>
|
||||
<textcolor>0xFFFFA500</textcolor>
|
||||
<textcolor>0xFFFFFFFF</textcolor>
|
||||
<shadowcolor>black</shadowcolor>
|
||||
<align>posx</align>
|
||||
<aligny>posy</aligny>
|
||||
<label></label>
|
||||
</control>
|
||||
<control type="label" id="10009">
|
||||
<posy>70</posy>
|
||||
<posx>140</posx>
|
||||
<posy>120</posy>
|
||||
<posx>200</posx>
|
||||
<height>40</height>
|
||||
<width>365</width>
|
||||
<font>font10</font>
|
||||
@@ -104,21 +104,21 @@
|
||||
<aligny>posy</aligny>
|
||||
<label></label>
|
||||
</control>
|
||||
<control type="label" id="100010">
|
||||
<posy>90</posy>
|
||||
<posx>20</posx>
|
||||
<control type="label" id="100010"> <!-- Punteggio -->
|
||||
<posy>140</posy>
|
||||
<posx>60</posx>
|
||||
<height>40</height>
|
||||
<width>100</width>
|
||||
<font>font10</font>
|
||||
<textcolor>0xFFFFA500</textcolor>
|
||||
<textcolor>0xFFFFFFFF</textcolor>
|
||||
<shadowcolor>black</shadowcolor>
|
||||
<align>posx</align>
|
||||
<aligny>posy</aligny>
|
||||
<label></label>
|
||||
</control>
|
||||
<control type="label" id="100011">
|
||||
<posy>90</posy>
|
||||
<posx>140</posx>
|
||||
<posy>140</posy>
|
||||
<posx>200</posx>
|
||||
<height>40</height>
|
||||
<width>365</width>
|
||||
<font>font10</font>
|
||||
@@ -130,21 +130,21 @@
|
||||
<aligny>posy</aligny>
|
||||
<label></label>
|
||||
</control>
|
||||
<control type="label" id="100012">
|
||||
<posy>110</posy>
|
||||
<posx>20</posx>
|
||||
<control type="label" id="100012"> <!-- Generi -->
|
||||
<posy>160</posy>
|
||||
<posx>60</posx>
|
||||
<height>40</height>
|
||||
<width>100</width>
|
||||
<font>font10</font>
|
||||
<textcolor>0xFFFFA500</textcolor>
|
||||
<textcolor>0xFFFFFFFF</textcolor>
|
||||
<shadowcolor>black</shadowcolor>
|
||||
<align>posx</align>
|
||||
<aligny>posy</aligny>
|
||||
<label></label>
|
||||
</control>
|
||||
<control type="label" id="100013">
|
||||
<posy>110</posy>
|
||||
<posx>140</posx>
|
||||
<posy>160</posy>
|
||||
<posx>200</posx>
|
||||
<height>40</height>
|
||||
<width>365</width>
|
||||
<font>font10</font>
|
||||
@@ -157,20 +157,20 @@
|
||||
<label></label>
|
||||
</control>
|
||||
<control type="label" id="100014">
|
||||
<posy>130</posy>
|
||||
<posx>20</posx>
|
||||
<posy>180</posy>
|
||||
<posx>60</posx>
|
||||
<height>40</height>
|
||||
<width>100</width>
|
||||
<font>font10</font>
|
||||
<textcolor>0xFFFFA500</textcolor>
|
||||
<textcolor>0xFFFFFFFF</textcolor>
|
||||
<shadowcolor>black</shadowcolor>
|
||||
<align>posx</align>
|
||||
<aligny>posy</aligny>
|
||||
<label></label>
|
||||
</control>
|
||||
<control type="label" id="100015">
|
||||
<posy>130</posy>
|
||||
<posx>140</posx>
|
||||
<posy>180</posy>
|
||||
<posx>200</posx>
|
||||
<height>40</height>
|
||||
<width>365</width>
|
||||
<font>font10</font>
|
||||
@@ -183,20 +183,20 @@
|
||||
<label></label>
|
||||
</control>
|
||||
<control type="label" id="100016">
|
||||
<posy>150</posy>
|
||||
<posx>20</posx>
|
||||
<posy>200</posy>
|
||||
<posx>60</posx>
|
||||
<height>40</height>
|
||||
<width>100</width>
|
||||
<font>font10</font>
|
||||
<textcolor>0xFFFFA500</textcolor>
|
||||
<textcolor>0xFFFFFFFF</textcolor>
|
||||
<shadowcolor>black</shadowcolor>
|
||||
<align>posx</align>
|
||||
<aligny>posy</aligny>
|
||||
<label></label>
|
||||
</control>
|
||||
<control type="label" id="100017">
|
||||
<posy>150</posy>
|
||||
<posx>140</posx>
|
||||
<posy>200</posy>
|
||||
<posx>200</posx>
|
||||
<height>40</height>
|
||||
<width>365</width>
|
||||
<font>font10</font>
|
||||
@@ -209,20 +209,20 @@
|
||||
<label></label>
|
||||
</control>
|
||||
<control type="label" id="100018">
|
||||
<posy>170</posy>
|
||||
<posx>20</posx>
|
||||
<posy>220</posy>
|
||||
<posx>60</posx>
|
||||
<height>40</height>
|
||||
<width>100</width>
|
||||
<font>font10</font>
|
||||
<textcolor>0xFFFFA500</textcolor>
|
||||
<textcolor>0xFFFFFFFF</textcolor>
|
||||
<shadowcolor>black</shadowcolor>
|
||||
<align>posx</align>
|
||||
<aligny>posy</aligny>
|
||||
<label></label>
|
||||
</control>
|
||||
<control type="label" id="100019">
|
||||
<posy>170</posy>
|
||||
<posx>140</posx>
|
||||
<posy>220</posy>
|
||||
<posx>200</posx>
|
||||
<height>40</height>
|
||||
<width>365</width>
|
||||
<font>font10</font>
|
||||
@@ -235,20 +235,20 @@
|
||||
<label></label>
|
||||
</control>
|
||||
<control type="label" id="100020">
|
||||
<posy>190</posy>
|
||||
<posx>20</posx>
|
||||
<posy>240</posy>
|
||||
<posx>60</posx>
|
||||
<height>40</height>
|
||||
<width>100</width>
|
||||
<font>font10</font>
|
||||
<textcolor>0xFFFFA500</textcolor>
|
||||
<textcolor>0xFFFFFFFF</textcolor>
|
||||
<shadowcolor>black</shadowcolor>
|
||||
<align>posx</align>
|
||||
<aligny>posy</aligny>
|
||||
<label></label>
|
||||
</control>
|
||||
<control type="label" id="100021">
|
||||
<posy>190</posy>
|
||||
<posx>140</posx>
|
||||
<posy>240</posy>
|
||||
<posx>200</posx>
|
||||
<height>40</height>
|
||||
<width>365</width>
|
||||
<font>font10</font>
|
||||
@@ -260,23 +260,23 @@
|
||||
<aligny>posy</aligny>
|
||||
<label></label>
|
||||
</control>
|
||||
<control type="label" id="100022">
|
||||
<posy>210</posy>
|
||||
<posx>20</posx>
|
||||
<control type="label" id="100022"> <!-- Trama -->
|
||||
<posy>260</posy>
|
||||
<posx>60</posx>
|
||||
<height>40</height>
|
||||
<width>505</width>
|
||||
<font>font10</font>
|
||||
<textcolor>0xFFFFA500</textcolor>
|
||||
<textcolor>0xFFFFFFFF</textcolor>
|
||||
<shadowcolor>black</shadowcolor>
|
||||
<align>center</align>
|
||||
<align>posx</align>
|
||||
<aligny>posy</aligny>
|
||||
<label></label>
|
||||
</control>
|
||||
<control type="textbox" id="100023">
|
||||
<posy>230</posy>
|
||||
<posx>20</posx>
|
||||
<height>185</height>
|
||||
<width>505</width>
|
||||
<posy>260</posy>
|
||||
<posx>200</posx>
|
||||
<height>294</height>
|
||||
<width>500</width>
|
||||
<font>font10</font>
|
||||
<textcolor>0xFFFFFFFF</textcolor>
|
||||
<shadowcolor>black</shadowcolor>
|
||||
@@ -288,17 +288,17 @@
|
||||
</control>
|
||||
|
||||
<control type="group" id="10024">
|
||||
<posy>450</posy>
|
||||
<posx>20</posx>
|
||||
<posy>600</posy>
|
||||
<posx>40</posx>
|
||||
<width>760</width>
|
||||
<height>30</height>
|
||||
|
||||
<control type="button" id="10025">
|
||||
<posy>0</posy>
|
||||
<posx>0</posx>
|
||||
<width>110</width>
|
||||
<height>30</height>
|
||||
<textwidth>100</textwidth>
|
||||
<width>200</width>
|
||||
<height>50</height>
|
||||
<textwidth>110</textwidth>
|
||||
<texturefocus>Controls/KeyboardKey.png</texturefocus>
|
||||
<texturenofocus>Controls/KeyboardKeyNF.png</texturenofocus>
|
||||
<align>center</align>
|
||||
@@ -307,10 +307,10 @@
|
||||
</control>
|
||||
<control type="button" id="10026">
|
||||
<posy>0</posy>
|
||||
<posx>115</posx>
|
||||
<width>110</width>
|
||||
<height>30</height>
|
||||
<textwidth>100</textwidth>
|
||||
<posx>210</posx>
|
||||
<width>200</width>
|
||||
<height>50</height>
|
||||
<textwidth>110</textwidth>
|
||||
<texturefocus>Controls/KeyboardKey.png</texturefocus>
|
||||
<texturenofocus>Controls/KeyboardKeyNF.png</texturenofocus>
|
||||
<align>center</align>
|
||||
@@ -319,10 +319,10 @@
|
||||
</control>
|
||||
<control type="button" id="10027">
|
||||
<posy>0</posy>
|
||||
<posx>253</posx>
|
||||
<width>110</width>
|
||||
<height>30</height>
|
||||
<textwidth>100</textwidth>
|
||||
<posx>420</posx>
|
||||
<width>200</width>
|
||||
<height>50</height>
|
||||
<textwidth>110</textwidth>
|
||||
<texturefocus>Controls/KeyboardKey.png</texturefocus>
|
||||
<texturenofocus>Controls/KeyboardKeyNF.png</texturenofocus>
|
||||
<align>center</align>
|
||||
@@ -331,10 +331,10 @@
|
||||
</control>
|
||||
<control type="button" id="10028">
|
||||
<posy>0</posy>
|
||||
<posx>390</posx>
|
||||
<width>110</width>
|
||||
<height>30</height>
|
||||
<textwidth>100</textwidth>
|
||||
<posx>640</posx>
|
||||
<width>200</width>
|
||||
<height>50</height>
|
||||
<textwidth>110</textwidth>
|
||||
<texturefocus>Controls/KeyboardKey.png</texturefocus>
|
||||
<texturenofocus>Controls/KeyboardKeyNF.png</texturenofocus>
|
||||
<align>center</align>
|
||||
@@ -342,12 +342,12 @@
|
||||
<label>$ADDON[plugin.video.kod 70007]</label>
|
||||
</control>
|
||||
<control type="label" id="100029">
|
||||
<posy>0</posy>
|
||||
<posx>750</posx>
|
||||
<posy>10</posy>
|
||||
<posx>1080</posx>
|
||||
<height>30</height>
|
||||
<width>110</width>
|
||||
<font>font10</font>
|
||||
<textcolor>0xFFFFA500</textcolor>
|
||||
<textcolor>0xFFFFFFFF</textcolor>
|
||||
<shadowcolor>black</shadowcolor>
|
||||
<align>right</align>
|
||||
<aligny>center</aligny>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "(?:openload|oload|openloads).*?/(?:embed|f|e)/([0-9a-zA-Z-_]+)",
|
||||
"pattern": "(?:openload|oload|openloads).*?/(?:embed|f|e|f[0-9])/([0-9a-zA-Z-_]+)",
|
||||
"url": "https://openload.co/embed/\\1/"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -3,16 +3,20 @@
|
||||
# -*- Created for Alfa-addon -*-
|
||||
# -*- By the Alfa Develop Group -*-
|
||||
|
||||
import re
|
||||
import urllib
|
||||
import os
|
||||
|
||||
from channelselector import get_thumb
|
||||
from core import httptools
|
||||
from core import jsontools
|
||||
from core import scrapertools
|
||||
from core import servertools
|
||||
from core import jsontools
|
||||
from channelselector import get_thumb
|
||||
from core import tmdb
|
||||
from core.item import Item
|
||||
from platformcode import logger, config, platformtools
|
||||
from specials import autoplay
|
||||
from specials import filtertools
|
||||
|
||||
list_data = {}
|
||||
|
||||
@@ -36,7 +40,7 @@ def mainlist(item):
|
||||
def show_channels(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
|
||||
|
||||
context = [{"title": config.get_localized_string(50005),
|
||||
"action": "remove_channel",
|
||||
"channel": "community"}]
|
||||
@@ -49,14 +53,18 @@ def show_channels(item):
|
||||
itemlist.append(Item(channel=item.channel, title=config.get_localized_string(70676), action='add_channel', thumbnail=get_thumb('add.png')))
|
||||
|
||||
for key, channel in json['channels'].items():
|
||||
|
||||
if 'poster' in channel:
|
||||
poster = channel['poster']
|
||||
if 'thumbnail' in channel:
|
||||
thumbnail = channel['thumbnail']
|
||||
else:
|
||||
poster = ''
|
||||
thumbnail = ''
|
||||
|
||||
if 'fanart' in channel:
|
||||
fanart = channel['fanart']
|
||||
else:
|
||||
fanart = ''
|
||||
|
||||
itemlist.append(Item(channel=item.channel, title=channel['channel_name'], url=channel['path'],
|
||||
thumbnail=poster, action='show_menu', channel_id = key, context=context))
|
||||
thumbnail=thumbnail, fanart=fanart, action='show_menu', channel_id = key, context=context))
|
||||
return itemlist
|
||||
|
||||
def load_json(item):
|
||||
@@ -80,7 +88,15 @@ def show_menu(item):
|
||||
|
||||
if "menu" in json_data:
|
||||
for option in json_data['menu']:
|
||||
itemlist.append(Item(channel=item.channel, title=option['title'], action='show_menu', url=option['link']))
|
||||
if 'thumbnail' in json_data:
|
||||
thumbnail = option['thumbnail']
|
||||
else:
|
||||
thumbnail = ''
|
||||
if 'fanart' in option and option['fanart']:
|
||||
fanart = option['fanart']
|
||||
else:
|
||||
fanart = item.fanart
|
||||
itemlist.append(Item(channel=item.channel, title=option['title'], thumbnail=thumbnail, fanart=fanart, action='show_menu', url=option['link']))
|
||||
autoplay.show_option(item.channel, itemlist)
|
||||
return itemlist
|
||||
|
||||
@@ -95,9 +111,6 @@ def show_menu(item):
|
||||
|
||||
return list_all(item)
|
||||
|
||||
|
||||
return itemlist
|
||||
|
||||
def list_all(item):
|
||||
logger.info()
|
||||
|
||||
@@ -161,7 +174,7 @@ def episodesxseason(item):
|
||||
infoLabels['season'] = season_number
|
||||
infoLabels['episode'] = episode_number
|
||||
|
||||
title = config.get_localized_string(70677) % (season_number, episode_number, episode_number)
|
||||
title = config.get_localized_string(70677) + ' %s' % (episode_number)
|
||||
|
||||
itemlist.append(Item(channel=item.channel, title=title, url=episode, action='findvideos',
|
||||
contentEpisodeNumber=episode_number, infoLabels=infoLabels))
|
||||
@@ -195,6 +208,7 @@ def findvideos(item):
|
||||
|
||||
def add_channel(item):
|
||||
logger.info()
|
||||
import xbmc
|
||||
import xbmcgui
|
||||
channel_to_add = {}
|
||||
json_file = ''
|
||||
@@ -224,6 +238,8 @@ def add_channel(item):
|
||||
platformtools.dialog_ok(config.get_localized_string(20000), config.get_localized_string(70682))
|
||||
return
|
||||
channel_to_add['channel_name'] = json_file['channel_name']
|
||||
channel_to_add['thumbnail'] = json_file['thumbnail']
|
||||
channel_to_add['fanart'] = json_file['fanart']
|
||||
path = os.path.join(config.get_data_path(), 'community_channels.json')
|
||||
|
||||
community_json = open(path, "r")
|
||||
@@ -240,6 +256,8 @@ def add_channel(item):
|
||||
|
||||
def remove_channel(item):
|
||||
logger.info()
|
||||
import xbmc
|
||||
import xbmcgui
|
||||
path = os.path.join(config.get_data_path(), 'community_channels.json')
|
||||
|
||||
community_json = open(path, "r")
|
||||
|
||||
@@ -105,7 +105,7 @@ def list_movies(item, silent=False):
|
||||
new_item.nfo = nfo_path
|
||||
new_item.path = raiz
|
||||
new_item.thumbnail = new_item.contentThumbnail
|
||||
new_item.text_color = "blue"
|
||||
# new_item.text_color = "blue"
|
||||
strm_path = new_item.strm_path.replace("\\", "/").rstrip("/")
|
||||
if '/' in new_item.path:
|
||||
new_item.strm_path = strm_path
|
||||
@@ -246,11 +246,11 @@ def list_tvshows(item):
|
||||
if item_tvshow.active and int(item_tvshow.active) > 0:
|
||||
texto_update = config.get_localized_string(60022)
|
||||
value = 0
|
||||
item_tvshow.text_color = "green"
|
||||
# item_tvshow.text_color = "green"
|
||||
else:
|
||||
texto_update = config.get_localized_string(60023)
|
||||
value = 1
|
||||
item_tvshow.text_color = "0xFFDF7401"
|
||||
# item_tvshow.text_color = "0xFFDF7401"
|
||||
|
||||
# Menu contextual: Eliminar serie/canal
|
||||
num_canales = len(item_tvshow.library_urls)
|
||||
|
||||
@@ -309,12 +309,22 @@ def monitor_update():
|
||||
logger.info("Inicio actualizacion programada para las %s h.: %s" % (update_start, datetime.datetime.now()))
|
||||
check_for_update(overwrite=False)
|
||||
|
||||
def get_channel_json():
|
||||
import urllib, os, xbmc, xbmcaddon
|
||||
addon = xbmcaddon.Addon('plugin.video.kod')
|
||||
ROOT_DIR = xbmc.translatePath(addon.getAddonInfo('Path'))
|
||||
LOCAL_FILE = os.path.join(ROOT_DIR, "channels.json")
|
||||
|
||||
if os.path.exists(LOCAL_FILE):
|
||||
os.remove(LOCAL_FILE)
|
||||
urllib.urlretrieve("https://raw.githubusercontent.com/kodiondemand/addon/master/channels.json", LOCAL_FILE)
|
||||
|
||||
if __name__ == "__main__":
|
||||
# Se ejecuta en cada inicio
|
||||
import xbmc
|
||||
import time
|
||||
|
||||
get_channel_json()
|
||||
|
||||
# modo adulto:
|
||||
# sistema actual 0: Nunca, 1:Siempre, 2:Solo hasta que se reinicie Kodi
|
||||
|
||||
Reference in New Issue
Block a user