Merge remote-tracking branch 'origin/master'

# Conflicts:
#	specials/resolverdns.py
This commit is contained in:
marco
2019-12-20 23:57:15 +01:00
11 changed files with 156 additions and 57 deletions

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.kod" name="Kodi on Demand BETA" version="0.5.2" provider-name="KOD Team">
<addon id="plugin.video.kod" name="Kodi on Demand BETA" version="0.6" provider-name="KOD Team">
<requires>
<import addon="xbmc.python" version="2.1.0"/>
<import addon="script.module.libtorrent" optional="true"/>
@@ -20,9 +20,9 @@
<screenshot>resources/media/themes/ss/2.png</screenshot>
<screenshot>resources/media/themes/ss/3.png</screenshot>
</assets>
<news>- Fixato cloudflare (parzialmente)
- Ricerca e navigazione più veloce
- N.B. Su Android alcunu siti come SerieHD e GuardaSerie.click non funzionano</news>
<news>-Nuova ricerca globale
-migliorie prestazionali in generale
-fix vari ai server</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]
[COLOR yellow]Kodi © is a registered trademark of the XBMC Foundation. We are not connected to or in any other way affiliated with Kodi, Team Kodi, or the XBMC Foundation. Furthermore, any software, addons, or products offered by us will receive no support in official Kodi channels, including the Kodi forums and various social networks.[/COLOR]</disclaimer>

View File

@@ -39,8 +39,7 @@ def mainlist(item):
tvshow = ['/category/serie-tv/'
]
## Anime = [(support.typo('Anime', 'bullet bold'),['/category/anime-giapponesi/', 'peliculas', 'anime', 'tvshow'])
## ]
anime = ['/category/anime-giapponesi/']
## Sport = [(support.typo('Sport', 'bullet bold'), ['/category/sport/', 'peliculas', 'sport', 'tvshow'])
## ]
@@ -53,7 +52,7 @@ def mainlist(item):
@support.scrape
def peliculas(item):
action = 'check'
patronBlock = r'<div class="container">.*?class="col-md-12[^"]*?">(?P<block>.*?)<div class=(?:"container"|"bg-dark ")>'
if item.args == 'newest':
patron = r'<div class="col-lg-3">[^>]+>[^>]+>\s<a href="(?P<url>[^"]+)".+?url\((?P<thumb>[^\)]+)\)">[^>]+>(?P<title>[^<]+)<[^>]+>[^>]+>(?:[^>]+>)?\s?(?P<rating>[\d\.]+)?[^>]+>.+?(?:[ ]\((?P<year>\d{4})\))?<[^>]+>[^>]+>(.?[\d\-x]+\s\(?(?P<lang>[sSuUbBiItTaA\-]+)?\)?\s?(?P<quality>[\w]+)?[|]?\s?(?:[fFiInNeE]+)?\s?\(?(?P<lang2>[sSuUbBiItTaA\-]+)?\)?)?'
@@ -64,19 +63,23 @@ def peliculas(item):
patronBlock = r'<section id="slider">(?P<block>.*?)</section>'
patron = r'<a href="(?P<url>(?:https:\/\/.+?\/(?P<title>[^\/]+[a-zA-Z0-9\-]+)(?P<year>\d{4})))/".+?url\((?P<thumb>[^\)]+)\)">'
elif item.contentType == 'tvshow':
action = 'episodios'
patron = r'<a href="(?P<url>[^"]+)".+?url\((?P<thumb>[^\)]+)\)">[^>]+>[^>]+>[^>]+>(?:[^>]+>)?\s?(?P<rating>[\d\.]+)?[^>]+>(?P<title>.+?)(?:[ ]\((?P<year>\d{4})\))?<[^>]+>[^>]+>(.?[\d\-x]+\s\(?(?P<lang>[sSuUbBiItTaA\-]+)?\)?\s?(?P<quality>[\w]+)?[|]?\s?(?:[fFiInNeE]+)?\s?\(?(?P<lang2>[sSuUbBiItTaA\-]+)?\)?)?'
if item.args == 'anime':
anime = True
patron = r'<div class="col-lg-3">[^>]+>[^>]+>\s<a href="(?P<url>[^"]+)".+?url\((?P<thumb>[^\)]+)\)">[^>]+>[^>]+>[^>]+>\s?(?P<rating>[\d\.]+)?[^>]+>[^>]+>(?P<title>.+?)\(?(?P<year>\d+)?\)?<[^>]+>[^>]+>(?:.+?[^fFiInNeE]+?\(?(?P<lang>[sSuUbBiItTaA]+)\)?.+?)<'
elif item.args == 'update':
# patron = r'<a href="(?P<url>[^"]+)".+?url\((?P<thumb>[^\)]+)\)">[^>]+>[^>]+>[^>]+>(?:[^>]+>)?\s?(?P<rating>[\d\.]+)?[^>]+>(?P<title>.+?)(?:[ ]\((?P<year>\d{4})\))?<[^>]+>[^>]+>(.?[\d\-x]+\s\(?(?P<lang>[sSuUbBiItTaA\-]+)?\)?\s?(?P<quality>[\w]+)?[|]?\s?(?:[fFiInNeE]+)?\s?\(?(?P<lang2>[sSuUbBiItTaA\-]+)?\)?)?'
# if item.args == 'anime':
# anime = True
# patron = r'<div class="col-lg-3">[^>]+>[^>]+>\s<a href="(?P<url>[^"]+)".+?url\((?P<thumb>[^\)]+)\)">[^>]+>[^>]+>[^>]+>\s?(?P<rating>[\d\.]+)?[^>]+>[^>]+>(?P<title>.+?)\(?(?P<year>\d+)?\)?<[^>]+>[^>]+>(?:.+?[^fFiInNeE]+?\(?(?P<lang>[sSuUbBiItTaA]+)\)?.+?)<'
if item.args == 'update':
patron = r'<a href="(?P<url>[^"]+)".+?url\((?P<thumb>.+?)\)">\s<div class="titolo">(?P<title>.+?)(?: &#8211; Serie TV)?(?:\([sSuUbBiItTaA\-]+\))?[ ]?(?P<year>\d{4})?</div>[ ]<div class="genere">(?:[\w]+?\.?\s?[\s|S]?[\dx\-S]+?\s\(?(?P<lang>[iItTaA]+|[sSuUbBiItTaA\-]+)\)?\s?(?P<quality>[HD]+)?|.+?\(?(?P<lang2>[sSuUbBiItTaA\-]+)?\)?</div>)'
pagination = 25
else:
patron = r'<a href="(?P<url>[^"]+)"\s*title="(?P<title>[^"\(]+)(?:"|\()(?:(?P<year>\d+)[^"]+)?.*?url\((?P<thumb>[^\)]+)\)(?:.*?<div class="voto">[^>]+>[^>]+>\s*(?P<rating>[^<]+))?.*?<div class="titolo">[^>]+>(?:<div class="genere">[^ ]*(?:\s\d+)?\s*(?:\()?(?P<lang>[^\)< ]+))?'
else:
#search
patron = r'<div class="col-lg-3">[^>]+>[^>]+>\s<a href="(?P<url>[^"]+)".+?url\((?P<thumb>[^\)]+)\)">[^>]+>[^>]+>[^>]+>(?:[^>]+>)?\s?(?P<rating>[\d\.]+)?[^>]+>(?P<title>.+?)(?:[ ]\((?P<year>\d{4})\))?<[^>]+>[^>]+>(.?[\d\-x]+\s\(?(?P<lang>[sSuUbBiItTaA\-]+)?\)?\s?(?P<quality>[\w]+)?[|]?\s?(?:[fFiInNeE]+)?\s?\(?(?P<lang2>[sSuUbBiItTaA\-]+)?\)?)?'
def itemHook(item):
if 'sub' in item.contentLanguage.lower():
item.contentLanguage= 'Sub-ITA'
item.title = re.sub('[Ss]ub(?:-)?', item.contentLanguage, item.title)
if item.lang2:
if len(item.lang2)<3:
item.lang2 = 'ITA'
@@ -93,19 +96,28 @@ def peliculas(item):
@support.scrape
def episodios(item):
data=item.data
# debug = True
support.log('EPISODIOS DATA',data)
if item.args == 'anime':
support.log("Anime :", item)
blacklist = ['Clipwatching', 'Verystream', 'Easybytez', 'Flix555', 'Cloudvideo']
patron = r'(Stagione (?P<season>\d+))?.+?<a target=(?P<url>[^>]+>(?P<title>.+?(?P<episode>\d+)))(?:[:]?.+?)(?:</a></p>|</a><br />)'
patronBlock = r'Stagione (?P<season>\d+)</span><br />(?P<block>.*?)(?:<div style="margin-left:|<span class="txt_dow">)'
# 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'
item.contentSerieName = item.fulltitle
# item.contentSerieName = item.fulltitle
else:# item.extra == 'serie':
# debug = True
support.log("Serie :", item)
patron = r'(?P<episode>\d+(?:&#215;|×)?\d+\-\d+|\d+(?:&#215;|×)\d+)[;]?[ ]?(?:(?P<title>[^<]+)(?P<url>.*?)|(\2[ ])(?:<(\3.*?)))(?:</a><br />|</a></p>)'
patronBlock = r'<p><strong>(?P<block>(?:.+?[Ss]tagione.+?(?P<lang>iTA|ITA|Sub-ITA|Sub-iTA))?(?:|.+?|</strong>)(/?:</span>)?</p>.*?</p>)'
patronBlock = r'<p><strong>(?:.+?[Ss]tagione\s)?(?:(?P<lang>iTA|ITA|Sub-ITA|Sub-iTA))?.*?</strong>(?P<block>.+?)(?:</span|</p)'
item.contentType = 'tvshow'
item.contentSerieName = item.fulltitle
# item.contentSerieName = item.fulltitle
def itemHook(item):
# support.dbg()
if not scrapertoolsV2.find_single_match(item.title, r'(\d+x\d+)'):
item.title = re.sub(r'(\d+) -', '1x\\1', item.title)
return item
return locals()
@@ -115,7 +127,7 @@ def genres(item):
action='peliculas'
patron_block=r'<div id="bordobar" class="dropdown-menu(?P<block>.*?)</li>'
patron=r'<a class="dropdown-item" href="(?P<url>[^"]+)" title="(?P<title>[A-z]+)"'
patronMenu=r'<a class="dropdown-item" href="(?P<url>[^"]+)" title="(?P<title>[A-z]+)"'
return locals()
@@ -124,7 +136,7 @@ def search(item, texto):
support.log(item.url,texto)
text = texto.replace(' ', '+')
item.url = host + "/?s=" + texto
item.contentType = 'episode'
item.contentType = 'tv'
item.args = 'search'
try:
return peliculas(item)
@@ -162,9 +174,41 @@ def newest(categoria):
return itemlist
def check(item):
data = httptools.downloadpage(item.url, headers=headers).data
# support.log('cinemalibero DATA=',data)
if data:
genere = scrapertoolsV2.find_single_match(data, r'rel="category tag">([a-zA-Z0-9]+).+?<')
blockAnime = scrapertoolsV2.find_single_match(data, r'<div id="container" class="container">(.+?<div style="margin-left)')
support.log('GENRE',genere)
if blockAnime:
support.log('È un ANIME')
if 'episodio' in blockAnime.lower() or 'saga' in blockAnime.lower():
item.contentType = 'tvshow'
item.args = 'anime'
item.data = blockAnime
return episodios(item)
elif scrapertoolsV2.find_single_match(blockAnime,r'\d+(?:&#215;|×)?\d+\-\d+|\d+(?:&#215;|×)\d+'):
item.contentType = 'tvshow'
item.data = blockAnime
return episodios(item)
else:
support.log('È un ANIME FILM')
item.contentType = 'movie'
item.url = data
return findvideos(item)
if genere.lower() == 'serie':
item.contentType = 'tvshow'
item.data = data
return episodios(item)
else:
support.log('È un FILM')
item.contentType = 'movie'
item.url = data
return findvideos(item)
def findvideos(item):
support.log('findvideos ->', item)
if item.contentType == 'movie' and item.args != 'anime':
return support.server(item)
else:
return support.server(item, data= item.url)
item.url = item.url.replace('http://rapidcrypt.net/verys/', '').replace('http://rapidcrypt.net/open/', '') #blocca la ricerca
return support.server(item, data= item.url)

View File

@@ -36,9 +36,7 @@ def getmainlist(view="thumb_"):
if addon.getSetting('enable_search_menu') == "true":
itemlist.append(Item(title=config.get_localized_string(30103), channel="search", path='special', action="mainlist",
thumbnail=get_thumb("search.png", view),
category=config.get_localized_string(30119), viewmode="list",
context=[{"title": config.get_localized_string(70286), "channel": "search", "action": "opciones",
"goto": True}]))
category=config.get_localized_string(30119), viewmode="list"))
if addon.getSetting('enable_onair_menu') == "true":
itemlist.append(Item(channel="filmontv", action="mainlist", title=config.get_localized_string(50001),

View File

@@ -165,7 +165,6 @@ def scrapeLang(scraped, lang, longtitle):
if not language: language = lang
if language: longtitle += typo(language, '_ [] color kod')
return language, longtitle
def cleantitle(title):
@@ -221,8 +220,8 @@ def scrapeBlock(item, args, block, patron, headers, action, pagination, debug, t
if scraped['season']:
stagione = scraped['season']
episode = scraped['season'] +'x'+ scraped['episode']
elif stagione:
episode = stagione +'x'+ scraped['episode']
elif item.season:
episode = item.season +'x'+ scraped['episode']
elif item.contentType == 'tvshow' and (scraped['episode'] == '' and scraped['season'] == '' and stagione == ''):
item.news = 'season_completed'
episode = ''
@@ -389,6 +388,9 @@ def scrape(func):
blocks = scrapertoolsV2.find_multiple_matches_groups(data, patronBlock)
block = ""
for bl in blocks:
# log(len(blocks),bl)
if 'season' in bl and bl['season']:
item.season = bl['season']
blockItemlist, blockMatches = scrapeBlock(item, args, bl['block'], patron, headers, action, pagination, debug,
typeContentDict, typeActionDict, blacklist, search, pag, function, lang)
for it in blockItemlist:

View File

@@ -2715,7 +2715,7 @@ msgid "Global Search"
msgstr ""
msgctxt "#60673"
msgid "MultiThread Search"
msgid "Number of Search Threads"
msgstr ""
msgctxt "#60674"

View File

@@ -2714,8 +2714,8 @@ msgid "Global Search"
msgstr "Ricerca globale"
msgctxt "#60673"
msgid "MultiThread Search"
msgstr "Ricerca MultiThread"
msgid "Number of Search Threads"
msgstr "Numero di Threads di Ricerca"
msgctxt "#60674"
msgid "Show Results:"

View File

@@ -4,7 +4,7 @@
"ignore_urls": [],
"patterns": [
{
"pattern": "clipwatching.com/((?:embed-)?[a-zA-Z0-9./_-]+).html",
"pattern": "clipwatching.com/((?:embed-)?[a-zA-Z0-9./_\\-\\[\\]\\(\\)]+).html",
"url": "http://clipwatching.com/\\1.html"
}
]

View File

@@ -4,7 +4,7 @@
"ignore_urls": [],
"patterns": [
{
"pattern": "cloudvideo.tv/(?:embed-)?([a-z0-9]+).html",
"pattern": "cloudvideo.tv/(?:embed-)?([a-z0-9]+)(?:.html)?",
"url": "https://cloudvideo.tv/embed-\\1.html"
}
]

View File

@@ -97,6 +97,7 @@ def show_channels(item):
def show_menu(item):
global list_data
itemlist = []
add_search = True
support.log()
# If Second Level Menu
if item.menu:
@@ -127,11 +128,16 @@ def show_menu(item):
filterkey=key if not url else '' ))
if menu.has_key('search'):
if type(menu['search']) == dict and menu['search'].has_key('url'):
url = relative('url', menu['search'], item.path)
else:
url = ''
itemlist.append(Item(channel=item.channel,
title=typo('Cerca ' + item.fulltitle +'...','color kod bold'),
thumbnail=get_thumb('search.png'),
action='search',
url=item.url,
custom_url=url,
path=item.path))
return itemlist
@@ -146,16 +152,28 @@ def show_menu(item):
url = relative('link', option, item.path)
submenu = option['submenu'] if option.has_key('submenu') else []
level2 = option['level2'] if option.has_key('level2') else []
itemlist.append(Item(channel=item.channel,
title=format_title(option['title']),
fulltitle=option['title'],
thumbnail=thumbnail,
fanart=fanart,
plot=plot,
action='show_menu',
url=url,
path=item.path,
menu=level2))
if option.has_key('title'):
itemlist.append(Item(channel=item.channel,
title=format_title(option['title']),
fulltitle=option['title'],
thumbnail=thumbnail,
fanart=fanart,
plot=plot,
action='show_menu',
url=url,
path=item.path,
menu=level2))
if option.has_key('search'):
menu = json_data['menu']
if type(option['search']) == dict and option['search'].has_key('url'):
url = relative('url', option['search'], item.path)
itemlist.append(Item(channel=item.channel,
title=typo('Cerca nel Canale...','color kod bold'),
thumbnail=get_thumb('search.png'),
action='search',
url=url,
path=item.path))
add_search = False
if submenu:
for key in submenu:
@@ -177,6 +195,10 @@ def show_menu(item):
action='submenu',
filterkey=key))
if submenu.has_key('search'):
if type(submenu['search']) == dict and submenu['search'].has_key('url'):
url = relative('url', submenu['search'], item.path)
else:
url = ''
itemlist.append(Item(channel=item.channel,
title=typo('Cerca ' + option['title'] +'...','color kod bold'),
thumbnail=get_thumb('search.png'),
@@ -205,13 +227,13 @@ def show_menu(item):
itemlist += list_all(item)
# add Search
if 'channel_name' in json_data:
if 'channel_name' in json_data and add_search:
itemlist.append(Item(channel=item.channel,
title=typo('Cerca nel Canale...','color kod bold'),
thumbnail=get_thumb('search.png'),
action='search',
url=item.url,
path=item.path))
title=typo('Cerca nel Canale...','color kod bold'),
thumbnail=get_thumb('search.png'),
action='search',
url=item.url,
path=item.path))
return itemlist
@@ -245,6 +267,7 @@ def submenu(item):
thumbnail = ''
plot = ''
if item.filterkey in ['director','actors']:
tmdb.set_infoLabels(itemlist, seekTmdb=True)
load_info = load_json('http://api.themoviedb.org/3/search/person/?api_key=' + tmdb_api + '&language=' + lang + '&query=' + filter)
id = str(load_info['results'][0]['id']) if load_info.has_key('results') else ''
if id:
@@ -655,7 +678,9 @@ def add_channel(item):
community_json = open(path, "r")
community_json = jsontools.load(community_json.read())
id = len(community_json['channels']) + 1
id = 1
while community_json['channels'].has_key(str(id)):
id +=1
community_json['channels'][id]=(channel_to_add)
with open(path, "w") as file:
@@ -732,6 +757,8 @@ def format_title(title):
def search(item, text):
support.log('Search ', text)
if item.custom_url:
item.url=item.custom_url + text
itemlist = []
json_data = load_json(item)
@@ -782,8 +809,9 @@ def load_links(item, itemlist, json_data, text):
if json_data.has_key('menu'):
for option in json_data['menu']:
json_data = load_json(option['link'] if option['link'].startswith('http') else item.path+option['link'])
load_links(item, itemlist, json_data, text)
if option.has_key('link'):
json_data = load_json(option['link'] if option['link'].startswith('http') else item.path+option['link'])
load_links(item, itemlist, json_data, text)
else:
links(item, itemlist, json_data, text)

View File

@@ -5,5 +5,16 @@
"adult": false,
"thumbnail": "",
"banner": "",
"categories": []
"categories": [],
"settings": [
{
"id": "thread_number",
"type": "list",
"label": "@60673",
"default": 0,
"enabled": true,
"visible": true,
"lvalues": ["auto","1","2","4","6","8","16","24","32","64"]
}
]
}

View File

@@ -11,6 +11,9 @@ from channelselector import get_thumb
from platformcode import logger, config, platformtools, unify
from core.support import typo
import gc
gc.disable()
import xbmcaddon
addon = xbmcaddon.Addon('metadata.themoviedb.org')
def_lang = addon.getSetting('language')
@@ -38,6 +41,9 @@ def mainlist(item):
itemlist.append(Item(channel=item.channel, title=config.get_localized_string(59994), action='opciones',
thumbnail=get_thumb('setting_0.png')))
itemlist.append(Item(channel=item.channel, title=config.get_localized_string(60415), action='settings',
thumbnail=get_thumb('setting_0.png')))
itemlist = set_context(itemlist)
return itemlist
@@ -179,7 +185,7 @@ def channel_search(item):
str(searching_titles))
config.set_setting('tmdb_active', False)
with futures.ThreadPoolExecutor() as executor:
with futures.ThreadPoolExecutor(max_workers=set_workers()) as executor:
c_results = [executor.submit(get_channel_results, ch, item, session) for ch in channel_list]
for res in futures.as_completed(c_results):
@@ -339,6 +345,13 @@ def get_channels(item):
def opciones(item):
return setting_channel_new(item)
def settings(item):
return platformtools.show_channel_settings(caption=config.get_localized_string(59993))
def set_workers():
list_mode=[None,1,2,4,6,8,16,24,32,64]
index = config.get_setting('thread_number', 'search')
return list_mode[index]
def setting_channel_new(item):
import xbmcgui
@@ -652,6 +665,9 @@ def set_context(itemlist):
for elem in itemlist:
elem.context = [{"title": config.get_localized_string(60412),
"action": "setting_channel_new",
"channel": "search"},
{"title": config.get_localized_string(60415),
"action": "settings",
"channel": "search"}]
return itemlist