KoD 1.7.5

- Aggiunti nuovi canali: 1337x e filmstreaming\n- fix cinemalibero, altadefinizione01\n- workaround per puntante non funzionanti quando si aggiorna la videoteca\n\n
This commit is contained in:
marco
2022-05-28 11:48:55 +02:00
parent 080bb798a1
commit 02239be925
22 changed files with 589 additions and 204 deletions

View File

@@ -1,4 +1,4 @@
<addon id="plugin.video.kod" name="Kodi on Demand" provider-name="KoD Team" version="1.7.4">
<addon id="plugin.video.kod" name="Kodi on Demand" version="1.7.5" provider-name="KoD Team">
<requires>
<!-- <import addon="script.module.libtorrent" optional="true"/> -->
<import addon="metadata.themoviedb.org"/>
@@ -6,7 +6,7 @@
<!-- <import addon="metadata.tvdb.com"/> -->
</requires>
<extension library="default.py" point="xbmc.python.pluginsource">
<extension point="xbmc.python.pluginsource" library="default.py">
<provides>video</provides>
</extension>
<extension point="kodi.context.item">
@@ -27,10 +27,9 @@
<screenshot>resources/media/screenshot-2.png</screenshot>
<screenshot>resources/media/screenshot-3.png</screenshot>
</assets>
<news>- Nuove visualizzazioni Server
- Fix Gestione Viste
- Aggiunto Pluto TV
- Fix e migliorie varie
<news>- Aggiunti nuovi canali: 1337x e filmstreaming
- fix cinemalibero, altadefinizione01
- workaround per puntante non funzionanti quando si aggiorna la videoteca
</news>
<description lang="it">Naviga velocemente sul web e guarda i contenuti presenti</description>
<disclaimer>[COLOR red]The owners and submitters to this addon do not host or distribute any of the content displayed by these addons nor do they have any affiliation with the content providers.[/COLOR]
@@ -41,6 +40,6 @@
<forum>https://t.me/kodiondemand</forum>
<source>https://github.com/kodiondemand/addon</source>
</extension>
<extension library="service.py" point="xbmc.service" start="login|startup">
<extension point="xbmc.service" library="service.py" start="login|startup">
</extension>
</addon>

View File

@@ -15,6 +15,7 @@
"discoveryplus": "https://www.discoveryplus.com",
"dreamsub": "https://dreamsub.me",
"eurostreaming": "https://eurostreaming.rest",
"filmstreaming": "https://filmstreaming.media",
"guardaseriecam": "https://guardaserie.cam",
"guardaserieclick": "https://www.guardaserie.builders",
"guardaserieicu": "https://www.guardaserie.pics",

19
channels/1337x.json Normal file
View File

@@ -0,0 +1,19 @@
{
"id": "1337x",
"name": "1337x",
"language": ["ita", "sub-ita", "eng"],
"active": true,
"thumbnail": "1337x.png",
"banner": "1337x.png",
"categories": ["movie", "tvshow", "torrent"],
"settings": [
{
"id": "itaSearch",
"type": "bool",
"label": "Cerca contenuti in italiano",
"default": false,
"enabled": true,
"visible": true
}
]
}

193
channels/1337x.py Normal file
View File

@@ -0,0 +1,193 @@
# -*- coding: utf-8 -*-
# ------------------------------------------------------------
# Canale per 1337x
# ------------------------------------------------------------
import inspect
from core import support
from platformcode import logger, config
# host = support.config.get_channel_url()
host = 'https://www.1337x.to'
@support.menu
def mainlist(item):
menu = [('Film ITA {bullet bold}',['/movie-lib-sort/all/it/popularity/desc/all/1/', 'peliculas', '', 'movie']),
('Film {submenu}',['/movie-library/1/', 'peliculas', 'filter', 'movie']),
('Serie TV {bullet bold}',['/series-library/', 'az', '', 'tvshow'])]
search = ''
return locals()
def moviefilter(item):
if logger.testMode:
return f'{host}/movie-lib-sort/all/all/score/desc/all/1/'
from platformcode import platformtools
item.args = ''
controls = []
data = support.match(item).data
patronBlock = r'<select name="{}"[^>]+>(.+?)</select>'
patron = r'value="([^"]+)">([^<]+)'
genres = support.match(data, patronBlock=patronBlock.format('genre'), patron=patron).matches
years = support.match(data, patronBlock=patronBlock.format('year'), patron=patron).matches
langs = support.match(data, patronBlock=patronBlock.format('lang'), patron=patron).matches
sorts = support.match(data, patronBlock=patronBlock.format('sortby'), patron=patron).matches
orders = support.match(data, patronBlock=patronBlock.format('sort'), patron=patron).matches
item.genreValues = [x[0] for x in genres]
item.yearValues = [x[0] for x in years]
item.langValues = [x[0] for x in langs]
item.sortValues = [x[0] for x in sorts]
item.orderValues = [x[0] for x in orders]
genres = [g[1] for g in genres]
years = [g[1] for g in years]
langs = [g[1] for g in langs]
sorts = [g[1] for g in sorts]
orders = [g[1] for g in orders]
controls.append({'id': 'lang', 'label': 'Lingua', 'type': 'list', 'enabled':True, 'visible':True, 'lvalues':langs, 'default': 0})
controls.append({'id': 'genre', 'label': 'Genere', 'type': 'list', 'enabled':True, 'visible':True, 'lvalues':genres, 'default': 0})
controls.append({'id': 'year', 'label': 'Anno', 'type': 'list', 'enabled':True, 'visible':True, 'lvalues':years, 'default': 0})
controls.append({'id': 'sort', 'label': 'Anno', 'type': 'list', 'enabled':True, 'visible':True, 'lvalues':sorts, 'default': 0})
controls.append({'id': 'order', 'label': 'Anno', 'type': 'list', 'enabled':True, 'visible':True, 'lvalues':orders, 'default': 0})
return platformtools.show_channel_settings(list_controls=controls, item=item, caption='Filtro', callback='filtered')
def filtered(item, values):
genre = item.genreValues[values['genre']]
lang = item.langValues[values['lang']]
sortby = item.sortValues[values['sort']]
order = item.orderValues[values['order']]
year = item.yearValues[values['year']]
return f'{host}/movie-lib-sort/{genre}/{lang}/{sortby}/{order}/{year}/1/'
def az(item):
import string
itemlist = [item.clone(title='1-9', url=f'{item.url}num/1/', action='peliculas', thumbnail=support.thumb('az'))]
for letter in list(string.ascii_lowercase):
itemlist.append(item.clone(title=letter.upper(), url=f'{item.url}{letter}/1/', action='peliculas', thumbnail=support.thumb('az')))
return itemlist
def search(item, text):
support.info('search', text)
item.args = 'search'
if config.get_setting('itaSearch', channel=item.channel, default=False):
text += ' ita'
text = text.replace(' ', '+')
item.url = f'{host}/search/{text}/1/'
try:
return peliculas(item)
# Cattura la eccezione così non interrompe la ricerca globle se il canale si rompe!
except:
import sys
for line in sys.exc_info():
support.logger.error("search except: ", line)
return []
@support.scrape
def peliculas(item):
if item.args == 'filter':
item.url = moviefilter(item)
if not item.url:
data = ' '
else:
data = support.match(item).data
if item.args == 'search':
sceneTitle = 'undefined'
patron = r'<a href="(?P<url>[^"]+)">(?P<title>[^<]+)<(?:[^>]+>){3,7}(?P<seed>[^<]+)<(?:[^>]+>){6}(?P<size>[^<]+)<span'
patronNext = r'"([^"]+)">&gt;&gt;'
elif item.contentType == 'movie':
patron = r'<img alt="[^"]*" data-original="(?P<thumb>[^"]+)(?:[^>]+>){15}(?P<title>[^<]+)(?:[^>]+>){18,23}\s*<a href="(?P<url>[^"]+)'
patronNext = r'"([^"]+)">&gt;&gt;'
else:
action = 'seasons'
patron = r'<img src="(?P<thumb>[^"]+)(?:[^>]+>){4}\s*<a href="(?P<url>[^"]+)[^>]+>(?P<title>[^<]+)'
if (item.args == 'search' or item.contentType != 'movie') and inspect.stack()[4][3] not in ['get_channel_results']:
patronNext = None
def itemlistHook(itemlist):
lastUrl = support.match(data, patron=r'href="([^"]+)">Last').match
if lastUrl:
currentPage = support.match(item.url, string=True, patron=r'/(\d+)/').match
nextPage = int(currentPage) + 1
support.nextPage(itemlist, item, next_page=item.url.replace(f'/{currentPage}', f'/{nextPage}'), function_or_level='peliculas')
return itemlist
return locals()
@support.scrape
def seasons(item):
item.contentType = 'season'
action = 'episodios'
patron = r'<li>\s*<a href="(?P<url>[^"]+)[^>]+>\s*<img alt="[^"]*"\ssrc="(?P<thumb>[^"]+)(?:([^>]+)>){2}\s*(?P<title>\w+ (?P<season>\d+))'
return locals()
@support.scrape
def episodios(item):
patron = r'<img src="(?P<thumb>[^"]+)(?:[^>]+>){13}\s*(?P<season>\d+)x(?P<episode>\d+)\s*<span class="seperator">(?:[^>]+>){2}\s*<a href="(?P<url>[^"]+)">(?P<title>[^<]+)'
def itemlistHook(itemlist):
itemlist.reverse()
return itemlist
return locals()
def findvideos(item):
itemlist = []
item.disableAutoplay = True
if item.args == 'search':
itemlist.append(item.clone(server='torrent', action='play'))
else:
from lib.guessit import guessit
items = support.match(item.url, patron=r'<a href="([^"]+)">([^<]+)<(?:[^>]+>){3}([^<]+)<(?:[^>]+>){6}([^<]+)<span').matches
for url, title, seed, size in items:
parsedTitle = guessit(title)
title = support.scrapertools.unescape(parsedTitle.get('title', ''))
lang = ''
if parsedTitle.get('language'):
langs = parsedTitle.get('language')
if isinstance(langs, list):
lang = 'MULTI'
else:
lang = vars(langs).get('alpha3').upper()
if not (lang.startswith('MUL') or lang.startswith('ITA')):
subs = parsedTitle.get('subtitle_language')
if isinstance(subs, list):
lang = 'Multi-Sub'
else:
lang = vars(subs).get('alpha3').upper()
if lang:
title = f'{title} [{lang}]'
sizematch = support.match(size, patron='(\d+(?:\.\d+)?)\s* (\w+)').match
sizenumber = float(sizematch[0])
if sizematch[1].lower() == 'gb':
sizenumber = sizenumber * 1024
itemlist.append(item.clone(title = f'{title} [{seed} SEEDS] [{size}]', seed=int(seed), size=sizenumber, url=host + url, server='torrent', action='play'))
itemlist.sort(key=lambda it: (it.seed, it.size), reverse=True)
Videolibrary = True if 'movie' in item.args else False
return support.server(item, itemlist=itemlist, Videolibrary=Videolibrary, Sorted=False)
def play(item):
from core import servertools
data = support.match(item.url, patron=r'href="(magnet[^"]+)').match
return servertools.find_video_items(item, data=data)

View File

@@ -79,6 +79,7 @@ def episodios(item):
def check(item):
item.data = httptools.downloadpage(item.url).data
if 'rel="tag">Serie TV' in item.data:
item.contentType = 'tvshow'
return episodios(item)
else:
return findvideos(item)

View File

@@ -51,13 +51,14 @@ def peliculas(item):
action="findvideos"
patron = r'<div class="cover boxcaption"> +<h2>\s*<a href="(?P<url>[^"]+)">(?P<title>[^<]+).*?src="(?P<thumb>[^"]+).*?<div class="trdublaj">(?P<quality>[^<]+).*?<span class="ml-label">(?P<year>[0-9]+).*?<span class="ml-label">(?P<duration>[^<]+).*?<p>(?P<plot>[^<]+)'
patronNext = '<span>\d</span> <a href="([^"]+)">'
if item.args == "search":
patronBlock = r'</script> <div class="boxgrid caption">(?P<block>.*)<div id="right_bar">'
elif item.args == 'update':
patronBlock = r'<div class="widget-title">Ultimi Film Aggiunti/Aggiornati</div>(?P<block>.*?)<div id="alt_menu">'
patron = r'style="background-image:url\((?P<thumb>[^\)]+).+?<p class="h4">(?P<title>.*?)</p>[^>]+> [^>]+> [^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+> [^>]+> [^>]+>[^>]+>(?P<year>\d{4})[^>]+>[^>]+> [^>]+>[^>]+>(?P<duration>\d+|N/A).+?>.*?(?:>Film (?P<lang>Sub ITA)</a></p> )?<p>(?P<plot>[^<]+)<.*?href="(?P<url>[^"]+)'
patron = r'style="background-image:url\((?P<thumb>[^\)]+).+?<p class="h4">(?P<title>.*?)</p>[^>]+> [^>]+> [^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+> [^>]+> [^>]+>[^>]+>(?P<year>\d{4})[^>]+>[^>]+> [^>]+>[^>]+>(?P<duration>\d+|N/A)?.+?>.*?(?:>Film (?P<lang>Sub ITA)</a></p> )?<p>(?P<plot>[^<]+)<.*?href="(?P<url>[^"]+)'
patronNext = '' # non ha nessuna paginazione
elif item.args == 'orderalf':
patron = r'<td class="mlnh-thumb"><a href="(?P<url>[^"]+)".*?src="(?P<thumb>[^"]+)"' \
'.+?[^>]+>[^>]+ [^>]+[^>]+ [^>]+>(?P<title>[^<]+).*?[^>]+>(?P<year>\d{4})<' \
@@ -65,7 +66,6 @@ def peliculas(item):
else:
patronBlock = r'<div class="cover_kapsul ml-mask">(?P<block>.*)<div class="page_nav">'
patronNext = '<span>\d</span> <a href="([^"]+)">'
# debug = True
return locals()
@@ -144,7 +144,7 @@ def newest(categoria):
def findvideos(item):
support.info('findvideos', item)
data = httptools.downloadpage(item.url).data
iframe = support.match(data, patron='player-container[^>]+>\s*<iframe[^>]+src="([^"]+)').match
iframe = support.match(data, patron='src="(http[^"]+)" frameborder').match
if iframe:
item.url = iframe
return support.server(item)

View File

@@ -194,7 +194,6 @@ def findvideos(item):
def load_links(itemlist, re_txt, desc_txt, quality=""):
streaming = scrapertools.find_single_match(data, re_txt).replace('"', '')
logger.debug('STREAMING', streaming)
logger.debug('STREAMING=', streaming)
matches = support.match(streaming, patron = r'<td><a.*?href=([^ ]+) [^>]+>([^<]+)<').matches
for scrapedurl, scrapedtitle in matches:
@@ -218,12 +217,9 @@ def findvideos(item):
# Estrae i contenuti - Streaming 3D
load_links(itemlist, '<strong>Streamin?g 3D[^<]+</strong>(.*?)cbtable', "Streaming 3D")
itemlist = support.server(item, itemlist=itemlist)
# Extract the quality format
patronvideos = r'([\w.]+)</strong></div></td>'
support.addQualityTag(item, itemlist, data, patronvideos)
return support.server(item, itemlist=itemlist)
return support.server(item, itemlist=itemlist, patronTag=patronvideos)
# Estrae i contenuti - Download
# load_links(itemlist, '<strong>Download:</strong>(.*?)<tableclass=cbtable height=30>', "aqua", "Download")

View File

@@ -8,8 +8,10 @@ import re
from core import httptools, support, scrapertools
from core.item import Item
from core.support import typo
from platformcode import config
from platformcode import config, logger
import sys
from platformcode.logger import debug
if sys.version_info[0] >= 3:
from concurrent import futures
else:
@@ -97,15 +99,16 @@ def episodios(item):
data = item.data
# debugBlock = True
if item.args == 'anime':
support.info("Anime :", item)
logger.debug("Anime :", item)
# blacklist = ['Clipwatching', 'Verystream', 'Easybytez', 'Flix555', 'Cloudvideo']
patron = r'<a target=(?P<url>[^>]+>(?P<title>Episodio\s(?P<episode>\d+))(?::)?(?:(?P<title2>[^<]+))?.*?(?:<br|</p))'
patronBlock = r'(?:Stagione (?P<season>\d+))?(?:</span><br />|</span></p>|strong></p>)(?P<block>.*?)(?:<div style="margin-left|<span class="txt_dow">)'
item.contentType = 'tvshow'
elif item.args == 'serie' or item.contentType == 'tvshow':
support.info("Serie :", item)
patron = r'(?:>| )(?P<episode>\d+(?:x|×|&#215;)\d+|Puntata \d+)[;]?[ ]?(?:(?P<title>[^<-]+)?(?P<data>.*?)|(\2[ ])(?:<(\3.*?)))(?:</a><br /|</a></p|$)|(?P<stagione>.+)'
patronBlock = r'>(?:[^<]+[Ss]tagione\s|[Ss]tagione [Uu]nica)(?:(?P<lang>iTA|ITA|Sub-ITA|Sub-iTA))?.*?</strong>(?P<block>.+?)(?:<strong|<div class="at-below)'
logger.debug("Serie :", item)
# debugBlock = True
patron = r'(?:/>|<p>)\s*(?:(?P<episode>\d+(?:x|×|&#215;)\d+|Puntata \d+)[;]?[ ]?(?P<title>[^<-]+))?(?P<data>.*?)(?:<br|</p)'
patronBlock = r'Stagione\s(?:[Uu]nica)?(?:(?P<lang>iTA|ITA|Sub-ITA|Sub-iTA))?.*?</strong>(?P<block>.+?)(?:strong>|<div class="at-below)'
item.contentType = 'tvshow'
else:
patron = r'(?P<title>\s*[0-9]{2}/[0-9]{2}/[0-9]{4})(?P<data>.*?)(?:<br|</p)'
@@ -118,7 +121,10 @@ def episodios(item):
def itemlistHook(itl):
ret = []
for it in itl:
if it.stagione: # stagione intera
ep = scrapertools.find_single_match(it.title, r'(\d+x\d+)')
if not ep and 'http' in it.data: # stagione intera
from lib import unshortenit
data = unshortenit.findlinks(it.data)
def get_ep(s):
srv_mod = __import__('servers.%s' % s.server, None, None, ["servers.%s" % s.server])
if hasattr(srv_mod, 'get_filename'):
@@ -128,15 +134,18 @@ def episodios(item):
if ep not in episodes:
episodes[ep] = []
episodes[ep].append(s)
servers = support.server(item, it.stagione, CheckLinks=False, Download=False, Videolibrary=False)
episodes = {}
servers = support.server(item, data, CheckLinks=False, Download=False, Videolibrary=False)
episodes = {}
for s in servers:
get_ep(s)
# ottengo l'episodio dal nome del file
with futures.ThreadPoolExecutor() as executor:
for s in servers:
executor.submit(get_ep, s)
ret.extend([it.clone(title=ep+typo(it.contentLanguage, '_ [] color kod'), contentSeason=int(ep.split('x')[0]), contentEpisodeNumber=int(ep.split('x')[1]), servers=[srv.tourl() for srv in episodes[ep]]) for ep in episodes])
else:
# with futures.ThreadPoolExecutor() as executor:
# for s in servers:
# executor.submit(get_ep, s)
# logger.debug(it.contentLanguage)
ret.extend([it.clone(title=typo(ep, 'bold')+typo(it.contentLanguage, '_ [] color kod bold'), contentSeason=int(ep.split('x')[0]), contentEpisodeNumber=int(ep.split('x')[1]), servers=[srv.tourl() for srv in episodes[ep]]) for ep in episodes])
elif ep:
ret.append(it)
return sorted(ret, key=lambda i: i.title)
@@ -153,7 +162,7 @@ def genres(item):
def search(item, texto):
support.info(item.url,texto)
logger.debug(item.url,texto)
texto = texto.replace(' ', '+')
item.url = host + "/?s=" + texto
# item.contentType = 'tv'
@@ -164,12 +173,12 @@ def search(item, texto):
except:
import sys
for line in sys.exc_info():
support.info("%s" % line)
logger.error("%s" % line)
return []
def newest(categoria):
support.info('newest ->', categoria)
logger.debug('newest ->', categoria)
itemlist = []
item = Item()
item.args = 'newest'
@@ -183,14 +192,14 @@ def newest(categoria):
except:
import sys
for line in sys.exc_info():
support.info('newest log: ', (line))
logger.error('newest log: ', (line))
return []
return itemlist
def check(item):
support.info()
logger.debug()
data = support.match(item.url, headers=headers).data
if data:
ck = support.match(data, patron=r'Supportaci condividendo quest[oa] ([^:]+)').match.lower()
@@ -208,13 +217,13 @@ def check(item):
itemlist = episodios(item)
if not itemlist:
item.data = data
item.action = 'findvideos'
# item.action = 'findvideos'
return findvideos(item)
elif ck == 'film':
item.contentType = 'movie'
item.data = data
item.action = 'findvideos'
# item.action = 'findvideos'
return findvideos(item)
else:
@@ -224,7 +233,7 @@ def check(item):
if not itemlist:
item.contentType = 'movie'
item.data = data
item.action = 'findvideos'
# item.action = 'findvideos'
return findvideos(item)
@@ -238,7 +247,7 @@ def findvideos(item):
if scrapertools.get_season_and_episode(title) == str(item.contentSeason) + "x" + str(
item.contentEpisodeNumber).zfill(2):
servers.append(s)
support.info()
logger.debug()
if item.servers:
return support.server(item, itemlist=[Item().fromurl(s) for s in item.servers])
if not item.data:

View File

@@ -0,0 +1,10 @@
{
"id": "filmstreaming",
"name": "Film Streaming",
"language": ["ita"],
"active": true,
"thumbnail": "filmstreaming.png",
"banner": "filmstreaming.png",
"categories": ["movie"],
"settings": []
}

93
channels/filmstreaming.py Normal file
View File

@@ -0,0 +1,93 @@
# -*- coding: utf-8 -*-
# ------------------------------------------------------------
# Canale per filmstreaming
# ------------------------------------------------------------
from core import support
from core.item import Item
from platformcode import config, logger
host = config.get_channel_url()
headers = [['Referer', host]]
@support.menu
def mainlist(item):
film = ['/film',
('Al Cinema', ['/cinema', 'peliculas']),
('Ultimi Inseriti', ['', 'peliculas', 'last']),
('Generi', ['', 'genres', 'genres']),
('Anno', ['', 'genres', 'years'])]
return locals()
def search(item, text):
logger.debug('search', text)
itemlist = []
text = text.replace(" ", "+")
item.url = f'{host}/index.php?do=search&subaction=search&story={text}'
try:
return peliculas(item)
except:
import sys
for line in sys.exc_info():
logger.error("search except: %s" % line)
return []
def newest(categoria):
logger.debug(categoria)
itemlist = []
item = Item()
try:
if categoria == "peliculas":
item.url = host
item.action = "peliculas"
item.contentType = 'movie'
item.args = 'last'
itemlist = peliculas(item)
if itemlist[-1].action == "peliculas":
itemlist.pop()
# Continua la ricerca in caso di errore
except:
import sys
for line in sys.exc_info():
logger.error("{0}".format(line))
return []
return itemlist
@support.scrape
def peliculas(item):
if item.args == 'last':
patronBlock = r'inseriti:(?P<block>.*?)<div class="block-showmore'
patron = r'item-movie">[^>]+><a href="(?P<url>[^"]+)[^>]+><img data-src="(?P<thumb>[^"]+)(?:[^>]+>){6}(?P<title>[^<]+)(?:[^>]+>){6}(?P<quality>[^<]+)'
patronNext = r'<a href="([^"]+)">&rarr'
return locals()
@support.scrape
def genres(item):
action = "peliculas"
_type ={'years':'Anno', 'genres':'Categorie'}
patronBlock = f'{_type[item.args]}(?:[^>]+>){{4}}(?P<block>.*?)</ul>'
patronMenu = '<li><a href="(?P<url>[^"]+)">(?P<title>.*?)</a>'
return locals()
def findvideos(item):
data = support.match(item.url).data
urls = support.match(data, patron=r'<span data-link="([^"]+)',).matches
if len(urls) > 1:
data = urls
else:
url = support.match(item.url, patron='<iframe.*?src="([^"]+)').match
data = support.match(url).data
return support.server(item, data)

View File

@@ -263,7 +263,7 @@ def play(item):
info = support.match(url, patron=r'LANGUAGE="([^"]+)",\s*URI="([^"]+)|RESOLUTION=\d+x(\d+).*?(http[^"\s]+)').matches
if info:
for lang, sub, res, url in info:
if sub:
if sub and not logger.testMode: # ai test non piace questa parte
if lang == 'auto': lang = 'ita-forced'
s = config.get_temp_file(lang +'.srt')
subs.append(s)

View File

@@ -412,6 +412,19 @@ def scrapeBlock(item, args, block, patron, headers, action, pagination, debug, t
if parsedTitle.get('episode_title'):
longtitle += s + parsedTitle.get('episode_title')
infolabels['episodeName'] = parsedTitle.get('episode_title')
if parsedTitle.get('language'):
langs = parsedTitle.get('language')
if isinstance(langs, list):
lang = 'MULTI'
else:
lang = vars(langs).get('alpha3').upper()
if not (lang.startswith('MUL') or lang.startswith('ITA')):
subs = parsedTitle.get('subtitle_language')
if isinstance(subs, list):
lang = 'Multi-Sub'
else:
lang = vars(subs).get('alpha3').upper()
except:
import traceback
logger.error(traceback.format_exc())
@@ -450,7 +463,7 @@ def scrapeBlock(item, args, block, patron, headers, action, pagination, debug, t
infoLabels=infolabels,
thumbnail=item.prevthumb if item.prevthumb else item.thumbnail if not scraped["thumb"] else scraped["thumb"],
args=item.args,
contentSerieName= title if contentType not in ['movie'] and function != 'episodios' or contentType in ['undefined'] else item.contentSerieName,
contentSerieName= title if contentType not in ['movie'] and function not in ['episodios', 'seasons'] or contentType in ['undefined'] else item.contentSerieName,
contentTitle= title if contentType in ['movie', 'undefined'] and function == 'peliculas' else item.contentTitle,
contentLanguage = lang1,
contentSeason= infolabels.get('season', ''),
@@ -608,7 +621,7 @@ def scrape(func):
if itemlist and action != 'play' and 'patronMenu' not in args and 'patronGenreMenu' not in args \
and not stackCheck(['add_tvshow', 'get_newest']) and (function not in ['episodios', 'mainlist'] \
or (function in ['episodios'] and config.get_setting('episode_info') and itemlist[0].season)):
or (function in ['episodios', 'seasons'] and config.get_setting('episode_info') and itemlist[0].season)):
# dbg()
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
@@ -757,7 +770,7 @@ def dooplay_menu(item, type):
return locals()
def menuItem(itemlist, filename, title='', action='', url='', contentType='undefined', args=[], style=True):
def menuItem(itemlist, filename, title='', action='', url='', contentType='undefined', args=[], style=True, folder=True):
# Function to simplify menu creation
# Call typo function
@@ -775,7 +788,8 @@ def menuItem(itemlist, filename, title='', action='', url='', contentType='undef
extra = extra,
args = args,
contentType = contentType,
globalsearch = not style
globalsearch = not style,
folder = folder
))
@@ -821,7 +835,8 @@ def menu(func):
url = host + var[0] if len(var) > 0 else '',
action = var[1] if len(var) > 1 else 'peliculas',
args=var[2] if len(var) > 2 else '',
contentType= var[3] if len(var) > 3 else 'movie')
contentType= var[3] if len(var) > 3 else 'movie',
folder = var[4] if len(var) > 4 else True)
# Make MAIN MENU
elif dictUrl[name] is not None:
@@ -844,7 +859,8 @@ def menu(func):
url = host + var[0] if len(var) > 0 else '',
action = var[1] if len(var) > 1 else 'peliculas',
args=var[2] if len(var) > 2 else '',
contentType= var[3] if len(var) > 3 else 'movie' if name == 'film' else 'tvshow')
contentType= var[3] if len(var) > 3 else 'movie' if name == 'film' else 'tvshow',
folder = var[4] if len(var) > 4 else True)
# add search menu for category
if 'search' not in args: menuItem(itemlist, filename, config.get_localized_string(70741) % title + '{submenu bold}', 'search', host + url, contentType='movie' if name == 'film' else 'tvshow', style=not global_search)
@@ -860,7 +876,8 @@ def menu(func):
url = host + var[0] if len(var) > 0 else '',
action = var[1] if len(var) > 1 else 'peliculas',
args=var[2] if len(var) > 2 else '',
contentType= var[3] if len(var) > 3 else 'movie',)
contentType= var[3] if len(var) > 3 else 'movie',
folder = var[4] if len(var) > 4 else True)
if single_search:
menuItem(itemlist, filename, config.get_localized_string(70741) % '{bold}', 'search', host + dictUrl['search'], style=not global_search)
@@ -1243,7 +1260,7 @@ def pagination(itemlist, item, page, perpage, function_level=1):
return itemlist
def server(item, data='', itemlist=[], headers='', CheckLinks=True, Download=True, patronTag=None, Videolibrary=True):
def server(item, data='', itemlist=[], headers='', CheckLinks=True, Download=True, patronTag=None, Videolibrary=True, Sorted=True):
logger.debug()
if not data and not itemlist:
@@ -1253,7 +1270,7 @@ def server(item, data='', itemlist=[], headers='', CheckLinks=True, Download=Tru
itemlist = itemlist + itemList
verifiedItemlist = []
def getItem(videoitem):
def getItem(n, videoitem):
# if not videoitem.server:
# s = servertools.get_server_from_url(videoitem.url)
# videoitem.server = s[2] if s else 'directo'
@@ -1299,6 +1316,7 @@ def server(item, data='', itemlist=[], headers='', CheckLinks=True, Download=Tru
vi.thumbnail = videoitem.thumbnail
vi.forcethumb = True
videoitem = vi
videoitem.position = n
return videoitem
# non threaded for webpdb
@@ -1309,14 +1327,18 @@ def server(item, data='', itemlist=[], headers='', CheckLinks=True, Download=Tru
# verifiedItemlist.append(it)
with futures.ThreadPoolExecutor() as executor:
thL = [executor.submit(getItem, videoitem) for videoitem in itemlist if videoitem.url or videoitem.video_urls]
thL = [executor.submit(getItem, n, videoitem) for n,videoitem in enumerate(itemlist) if videoitem.url or videoitem.video_urls]
for it in futures.as_completed(thL):
if it.result() and not config.get_setting("black_list", server=it.result().server.lower()):
verifiedItemlist.append(it.result())
try:
verifiedItemlist.sort(key=lambda it: int(re.sub(r'\D','',it.quality)))
except:
verifiedItemlist.sort(key=lambda it: it.quality, reverse=True)
if not Sorted:
verifiedItemlist.sort(key=lambda it: it.position)
# if Sorted:
# try:
# verifiedItemlist.sort(key=lambda it: int(re.sub(r'\D','',it.quality)))
# except:
# verifiedItemlist.sort(key=lambda it: it.quality, reverse=True)
if patronTag:
addQualityTag(item, verifiedItemlist, data, patronTag)
@@ -1325,7 +1347,8 @@ def server(item, data='', itemlist=[], headers='', CheckLinks=True, Download=Tru
checklinks_number = config.get_setting('checklinks_number')
verifiedItemlist = servertools.check_list_links(verifiedItemlist, checklinks_number)
verifiedItemlist = servertools.sort_servers(verifiedItemlist)
if Sorted:
verifiedItemlist = servertools.sort_servers(verifiedItemlist)
if Videolibrary and item.contentChannel != 'videolibrary':
videolibrary(verifiedItemlist, item)

View File

@@ -17,7 +17,6 @@ from base64 import b64decode
from core import httptools, scrapertools
from platformcode import config, logger
def find_in_text(regex, text, flags=re.IGNORECASE | re.DOTALL):
rec = re.compile(regex, flags=flags)
match = rec.search(text)
@@ -48,11 +47,13 @@ class UnshortenIt(object):
# for services that only include real link inside iframe
_simple_iframe_regex = r'cryptmango|xshield\.net|vcrypt\.club|isecure\.link'
# for services that only do redirects
_simple_redirect = r'streamcrypt\.net/[^/]+|is\.gd|www\.vedere\.stream'
_simple_redirect = r'streamcrypt\.net/[^/]+|is\.gd|www\.vedere\.stream|isecure\.link'
_filecrypt_regex = r'filecrypt\.cc'
listRegex = [_adfly_regex, _linkbucks_regex, _adfocus_regex, _lnxlu_regex, _shst_regex, _hrefli_regex, _anonymz_regex,
_shrink_service_regex, _rapidcrypt_regex, _simple_iframe_regex, _linkup_regex, _linkhub_regex,
_swzz_regex, _stayonline_regex, _snip_regex, _linksafe_regex, _protectlink_regex, _uprot_regex, _simple_redirect]
_swzz_regex, _stayonline_regex, _snip_regex, _linksafe_regex, _protectlink_regex, _uprot_regex, _simple_redirect,
_filecrypt_regex]
_maxretries = 5
@@ -61,7 +62,7 @@ class UnshortenIt(object):
def unshorten(self, uri, type=None):
code = 0
originalUri = uri
originalUri = uri.replace('%0A', '\n')
while True:
uri = uri.strip()
oldUri = uri
@@ -108,6 +109,8 @@ class UnshortenIt(object):
uri, code = self._unshorten_protectlink(uri)
if re.search(self._uprot_regex, uri, re.IGNORECASE):
uri, code = self._unshorten_uprot(uri)
if re.search(self._filecrypt_regex, uri, re.IGNORECASE):
uri, code = self._unshorten_filecrypt(uri)
if re.search(self._simple_redirect, uri, re.IGNORECASE):
p = httptools.downloadpage(uri)
uri = p.url
@@ -700,6 +703,19 @@ class UnshortenIt(object):
return link, 200
return uri, 200
# container, for returning only the first result
def _unshorten_filecrypt(self, uri):
url = ''
try:
fc = FileCrypt(uri)
url = fc.unshorten(fc.list_files()[0][1])
except:
import traceback
logger.error(traceback.format_exc())
if url:
return url, 200
else:
return uri, 200
def decrypt_aes(text, key):

View File

@@ -444,7 +444,7 @@ def viewmodeMonitor():
currentModeName = xbmc.getInfoLabel('Container.Viewmode')
currentMode = int(xbmcgui.Window(10025).getFocusId())
# logger.debug('SAVE VIEW 1', currentMode, parent.action, item.action)
if 50 <= currentMode < 520 and parent and parent.action != item.action:
if 50 <= currentMode < 599 and parent and parent.action != item.action:
content, Type = getCurrentView(item, parent)
view_mode_type = config.get_setting('view_mode_%s' % content)
# logger.debug('VIEW MODE TYPE')
@@ -771,7 +771,8 @@ def set_context_commands(item, item_url, parent_item, **kwargs):
# Download season
elif item.contentType == "season":
context_commands.append((config.get_localized_string(60357), "RunPlugin(%s?%s&%s)" % (sys.argv[0], item_url, 'channel=downloads&action=save_download&download=season&from_channel=' + item.channel + '&from_action=' + item.action)))
if item.contentType in ['movie', 'episode'] and config.get_setting('autoplay'):
context_commands.append((config.get_localized_string(70192), "RunPlugin(%s?%s&%s)" % (sys.argv[0], item_url, 'disableAutoplay=true')))
if item.nextPage:
context_commands.append((config.get_localized_string(70511), "RunPlugin(%s?%s&%s)" % (sys.argv[0], item_url, 'action=gotopage&real_action='+item.action)))
if config.dev_mode():
@@ -2010,7 +2011,7 @@ def serverWindow(item, itemlist):
if itemlist:
reopen = False
if config.get_setting('autoplay'):
if config.get_setting('autoplay') and not item.disableAutoplay:
reopen = True
from core import autoplay
autoplay.start(itemlist, item)

View File

@@ -93,19 +93,22 @@ def mark_auto_as_watched(item):
logger.debug('REOPEN')
item.played_time = actual_time
db['controls']['reopen'] = True
db.close()
platformtools.set_played_time(item)
# Silent sync with Trakt
if sync and config.get_setting("trakt_sync"): sync_trakt_kodi()
while platformtools.is_playing():
xbmc.sleep(100)
xbmc.sleep(300)
if next_episode and next_episode.next_ep and config.get_setting('next_ep') < 3:
from platformcode.launcher import run
xbmc.sleep(1000)
run(next_episode)
db.close()
# If it is configured to mark as seen
if config.get_setting("mark_as_watched", "videolibrary"):
threading.Thread(target=mark_as_watched_subThread, args=[item]).start()

View File

@@ -1,133 +1,139 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<window>
<depth>0.52</depth>
<coordinates>
<left>0</left>
<top>0</top>
</coordinates>
<controls>
<!-- GROUP CONTROLS -->
<control type="group">
<left>0</left>
<top>0</top>
<animation type="WindowOpen" reversible="false">
<effect type="slide" start="0,100" end="0,0" delay="160" time="160" />
<effect type="fade" delay="160" end="100" time="100" />
</animation>
<animation type="WindowClose" reversible="false">
<effect type="slide" start="0,0" end="0,100" delay="160" time="160" />
<effect type="fade" delay="160" start="100" end="0" time="100" />
</animation>
<!-- BACKGROUND -->
<control type="image">
<width>1280</width>
<height>720</height>
<texture colordiffuse="FF232323">white.png</texture>
</control>
<!-- FANART -->
<control type="image" id='30000'>
<width>1280</width>
<height>720</height>
<texture colordiffuse="FF555555"></texture>
</control>
<!-- LOADING -->
<control type="image" id='30001'>
<top>355</top>
<left>490</left>
<width>300</width>
<height>10</height>
<texture>white.png</texture>
<animation effect="zoom" pulse ="true" center="auto" start="0,100" end="100,100" time="1000" condition="Control.IsVisible(30001)">Conditional</animation>
</control>
<control type="button" id="30003">
<top>40</top>
<right>40</right>
<height>50</height>
<width>50</width>
<textcolor>FFFFFFFF</textcolor>
<aligny>center</aligny>
<align>center</align>
<texturefocus colordiffuse="FFFFFFFF">close.png</texturefocus>
<texturenofocus colordiffuse="80FFFFFF">close.png</texturenofocus>
<ondown>30002</ondown>
</control>
<!-- SELECTION -->
<control type="fixedlist" id="30002">
<top>40</top>
<width>100%</width>
<height>640</height>
<viewtype>wrap</viewtype>
<orientation>horizontal</orientation>
<scrolltime tween="cubic" easing="out">300</scrolltime>
<onup>30003</onup>
<itemlayout width="180">
<!-- Poster -->
<control type="image">
<top>370</top>
<depth>0.52</depth>
<coordinates>
<left>0</left>
<top>0</top>
</coordinates>
<controls>
<!-- GROUP CONTROLS -->
<control type="group">
<left>0</left>
<width>180</width>
<height>270</height>
<texture>$INFO[ListItem.Property(thumbnail)]</texture>
<aspectratio>scale</aspectratio>
<bordersize>10</bordersize>
</control>
</itemlayout>
<focusedlayout width="427">
<!-- Title -->
<control type="textbox">
<left>447</left>
<top>10</top>
<width>783</width>
<height>30</height>
<font>font13</font>
<textcolor>FFFFFFFF</textcolor>
<shadowcolor>00000000</shadowcolor>
<label>[B]$INFO[ListItem.Label] [COLOR FFAAAAAA] $INFO[ListItem.Property(year)][/COLOR][/B] </label>
<align>left</align>
<aligny>center</aligny>
</control>
<!-- info -->
<control type="textbox">
<left>447</left>
<top>50</top>
<width>783</width>
<height>30</height>
<font>font13</font>
<textcolor>FFFFFFFF</textcolor>
<shadowcolor>00000000</shadowcolor>
<label>$ADDON[plugin.video.kod 60382] $INFO[ListItem.Property(genre)] | $ADDON[plugin.video.kod 60380] [B]$INFO[ListItem.Property(rating)][/B]</label>
<align>left</align>
</control>
<!-- Plot -->
<control type="textbox">
<left>447</left>
<top>90</top>
<width>783</width>
<height>250</height>
<font>font13</font>
<textcolor>FFFFFFFF</textcolor>
<shadowcolor>00000000</shadowcolor>
<label>$INFO[ListItem.Property(plot)]</label>
<autoscroll time="3000" delay="3000" repeat="3000">True</autoscroll>
<align>left</align>
</control>
<!-- Poster -->
<control type="image">
<bottom>0</bottom>
<left>0</left>
<width>427</width>
<height>640</height>
<texture>$INFO[ListItem.Property(thumbnail)]</texture>
<aspectratio>scale</aspectratio>
<bordersize>10</bordersize>
</control>
</focusedlayout>
</control>
</control> <!-- GROUP CONTROLS END -->
</controls>
</window>
<top>0</top>
<animation type="WindowOpen" reversible="false">
<effect type="slide" start="0,100" end="0,0" delay="160" time="160" />
<effect type="fade" delay="160" end="100" time="100" />
</animation>
<animation type="WindowClose" reversible="false">
<effect type="slide" start="0,0" end="0,100" delay="160" time="160" />
<effect type="fade" delay="160" start="100" end="0" time="100" />
</animation>
<!-- BACKGROUND -->
<control type="image">
<width>1280</width>
<height>720</height>
<texture colordiffuse="FF232323">white.png</texture>
</control>
<!-- FANART -->
<control type="image" id='30000'>
<width>1280</width>
<height>720</height>
<texture colordiffuse="FF555555"></texture>
</control>
<!-- LOADING -->
<control type="image" id='30001'>
<top>355</top>
<left>490</left>
<width>300</width>
<height>10</height>
<texture>white.png</texture>
<animation effect="zoom" pulse ="true" center="auto" start="0,100" end="100,100" time="1000" condition="Control.IsVisible(30001)">Conditional</animation>
</control>
<!-- SELECTION -->
<control type="fixedlist" id="30002">
<top>40</top>
<width>100%</width>
<height>640</height>
<viewtype>wrap</viewtype>
<orientation>horizontal</orientation>
<scrolltime tween="cubic" easing="out">300</scrolltime>
<onup>30003</onup>
<itemlayout width="180">
<!-- Poster -->
<control type="image">
<top>370</top>
<left>0</left>
<width>180</width>
<height>270</height>
<texture>$INFO[ListItem.Property(thumbnail)]</texture>
<aspectratio>scale</aspectratio>
<bordersize>10</bordersize>
</control>
</itemlayout>
<focusedlayout width="427">
<!-- Title -->
<control type="textbox">
<left>447</left>
<top>10</top>
<width>783</width>
<height>30</height>
<font>font13</font>
<textcolor>FFFFFFFF</textcolor>
<shadowcolor>00000000</shadowcolor>
<label>[B]$INFO[ListItem.Label] [COLOR FFAAAAAA] $INFO[ListItem.Property(year)][/COLOR][/B] </label>
<align>left</align>
<aligny>center</aligny>
</control>
<!-- info -->
<control type="textbox">
<left>447</left>
<top>50</top>
<width>783</width>
<height>30</height>
<font>font13</font>
<textcolor>FFFFFFFF</textcolor>
<shadowcolor>00000000</shadowcolor>
<label>$ADDON[plugin.video.kod 60382] $INFO[ListItem.Property(genre)] | $ADDON[plugin.video.kod 60380] [B]$INFO[ListItem.Property(rating)][/B]</label>
<align>left</align>
</control>
<!-- Plot -->
<control type="textbox">
<left>447</left>
<top>90</top>
<width>783</width>
<height>250</height>
<font>font13</font>
<textcolor>FFFFFFFF</textcolor>
<shadowcolor>00000000</shadowcolor>
<label>$INFO[ListItem.Property(plot)]</label>
<autoscroll time="3000" delay="3000" repeat="3000">True</autoscroll>
<align>left</align>
</control>
<!-- Poster -->
<control type="image">
<bottom>0</bottom>
<left>0</left>
<width>427</width>
<height>640</height>
<texture>$INFO[ListItem.Property(thumbnail)]</texture>
<aspectratio>scale</aspectratio>
<bordersize>10</bordersize>
</control>
</focusedlayout>
</control>
<control type='button'>
<description>Result Overflow</description>
<top>0</top>
<left>430</left>
<width>880</width>
<height>100%</height>
<texturefocus></texturefocus>
<texturenofocus></texturenofocus>
</control>
<control type="button" id="30003">
<description>Close</description>
<top>40</top>
<right>40</right>
<height>50</height>
<width>50</width>
<textcolor>FFFFFFFF</textcolor>
<aligny>center</aligny>
<align>center</align>
<texturefocus colordiffuse="FFFFFFFF">close.png</texturefocus>
<texturenofocus colordiffuse="80FFFFFF">close.png</texturenofocus>
<ondown>30002</ondown>
</control>
</control>
<!-- GROUP CONTROLS END -->
</controls>
</window>

View File

@@ -4,7 +4,7 @@
"ignore_urls": [],
"patterns": [
{
"pattern": "(?:streamsb|sbembed|sbembed1|sbplay1|sbplay|pelistop|tubesb|playersb|embedsb|watchsb|streamas).\\w{2,5}/(?:embed-|d/|e/)?([A-z0-9]+)",
"pattern": "(?:streamsb|sbembed|sbembed1|sbplay1|sbplay|pelistop|tubesb|playersb|embedsb|watchsb|streamas|sbfast|sbfull|viewsb).\\w{2,5}/(?:embed-|d/|e/)?([A-z0-9]+)",
"url": "https://streamsb.net/d/\\1"
},
{

View File

@@ -40,8 +40,9 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
def get_filename(page_url):
title = httptools.downloadpage(page_url).data.split('<title>')[1].split('</title>')[0]
prefix = 'Watch '
# from core.support import dbg;dbg()
title = httptools.downloadpage(page_url).data.split('<h3>')[1].split('</h3>')[0]
prefix = 'Download '
if title.startswith(prefix):
return title[len(prefix):]
return ""

View File

@@ -37,4 +37,12 @@ def get_video_url(page_url, video_password=""):
url += "|Referer=https://streamz.ws/&User-Agent=Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14'"
video_urls.append(["mp4 [streamZ]", url])
return video_urls
return video_urls
def get_filename(page_url):
# support.dbg()
title = httptools.downloadpage(page_url).data.split('<title>')[1].split('</title>')[0]
prefix = 'StreamZZ.to '
if title.startswith(prefix):
return title[len(prefix):]
return ""

View File

@@ -231,7 +231,7 @@ def mostrar_perfil(item):
'i_enlace': i_enlace, 'i_perfil': i_perfil} ]
it.plot += '[CR][CR]' + config.get_localized_string(70724) + ': ' + it.channel + ' ' + config.get_localized_string(60266) + ': ' + it.action
if it.extra != '': it.plot += ' Extra: ' + it.extra
if (type(it.extra) is str) and it.extra != '': it.plot += ' Extra: ' + it.extra
it.plot += '[CR]Url: ' + it.url if isinstance(it.url, str) else '...'
if it.date_added != '': it.plot += '[CR]' + config.get_localized_string(70469) + ': ' + it.date_added

View File

@@ -270,7 +270,7 @@ def get_seasons(item):
itemlist = sorted(itemlist, key=lambda it: int(it.contentSeason))
if config.get_setting("show_all_seasons", "videolibrary"):
new_item = item.clone(action="get_episodes", title=config.get_localized_string(60030))
new_item = item.clone(action="get_episodes", channel='videolibrary', title=config.get_localized_string(60030))
new_item.infoLabels["playcount"] = 0
itemlist.insert(0, new_item)
@@ -363,12 +363,17 @@ def findvideos(item):
content_title = str(item.contentSeason) + 'x' + (str(item.contentEpisodeNumber) if item.contentEpisodeNumber > 9 else '0' + str(item.contentEpisodeNumber))
else:
content_title = item.contentTitle.strip().lower()
# Fix in case item.streampath is a full path
import re
paths = re.split('\\\|/', item.strm_path)
strm_path = filetools.join(paths[-2],paths[-1])
if item.contentType == 'movie':
strm_path = filetools.join(videolibrarytools.MOVIES_PATH, item.strm_path)
strm_path = filetools.join(videolibrarytools.MOVIES_PATH, strm_path)
path_dir = filetools.dirname(strm_path)
item.nfo = filetools.join(path_dir, filetools.basename(path_dir) + ".nfo")
else:
strm_path = filetools.join(videolibrarytools.TVSHOWS_PATH, item.strm_path)
strm_path = filetools.join(videolibrarytools.TVSHOWS_PATH, strm_path)
path_dir = filetools.dirname(strm_path)
item.nfo = filetools.join(path_dir, 'tvshow.nfo')
@@ -1087,6 +1092,7 @@ def delete(item):
if item_nfo.emergency_urls and item_nfo.emergency_urls.get(canal, False):
del item_nfo.emergency_urls[canal]
filetools.write(item.nfo, head_nfo + item_nfo.tojson())
platformtools.itemlist_refresh()
return num_enlaces
else:
if platformtools.dialog_yesno(heading, config.get_localized_string(70088) % item.infoLabels['title']):

View File

@@ -64,7 +64,7 @@ validUrlRegex = re.compile(
r'(?::\d+)?' # optional port
r'(?:/?|[/?]\S+)$', re.IGNORECASE)
chBlackList = ['url', 'mediasetplay', 'metalvideo', 'altadefinizionecommunity']
chBlackList = ['url', 'mediasetplay', 'metalvideo', 'accuradio']
srvBlacklist = ['mega', 'hdmario', 'torrent', 'youtube']
chNumRis = {
'altadefinizione01': {
@@ -186,7 +186,7 @@ for chItem in channel_list:
else:
itemlist = getattr(module, it.action)(it)
if itemlist and itemlist[0].action in ('findvideos', 'episodios'):
if not firstContent and itemlist and itemlist[0].action in ('findvideos', 'episodios'):
firstContent = re.match('[ \w]*', itemlist[0].fulltitle).group(0)
# some sites might have no link inside, but if all results are without servers, there's something wrong
@@ -195,7 +195,7 @@ for chItem in channel_list:
if hasattr(module, resIt.action):
serversFound[it.title] = getattr(module, resIt.action)(resIt)
if serversFound[it.title] and resIt.action == 'episodios':
getattr(module, serversFound[it.title][0].action)(serversFound[it.title][0])
serversFound[it.title] = getattr(module, serversFound[it.title][0].action)(serversFound[it.title][0])
else:
serversFound[it.title] = [resIt]