Gestione icone automatico (Inizio)
This commit is contained in:
@@ -60,7 +60,7 @@ def peliculas(item):
|
||||
def genres(item):
|
||||
item.contentType = 'undefined'
|
||||
action = 'peliculas'
|
||||
patronMenu = r'<li><a href="(?P<url>[^"]+)">(?P<title>[^<]+)<'
|
||||
patronGenreMenu = r'<li><a href="(?P<url>[^"]+)">(?P<title>[^<]+)<'
|
||||
|
||||
if item.args == 'genres':
|
||||
patronBlock = r'<ul class="listSubCat" id="Film">(?P<block>.*)<ul class="listSubCat" id="Anno">'
|
||||
|
||||
@@ -30,7 +30,7 @@ def mainlist(item):
|
||||
def genres(item):
|
||||
action = 'peliculas'
|
||||
blacklist = ['PRIME VISIONI', 'ULTIME SERIE TV', 'ULTIMI FILM']
|
||||
patronMenu = r'<li><a href="(?P<url>[^"]+)">(?P<title>[^<>]+)</a></li>'
|
||||
patronGenreMenu = r'<li><a href="(?P<url>[^"]+)">(?P<title>[^<>]+)</a></li>'
|
||||
patronBlock = r'<div class="container home-cats">(?P<block>.*?)<div class="clear">'
|
||||
return locals()
|
||||
|
||||
|
||||
@@ -47,6 +47,8 @@ def mainlist(item):
|
||||
def menu(item):
|
||||
patronBlock = item.args + r'<span.*?><\/span>.*?<ul.*?>(?P<block>.*?)<\/ul>'
|
||||
patronMenu = r'href="?(?P<url>[^">]+)"?>(?P<title>.*?)<\/a>'
|
||||
if 'genere' in item.args.lower():
|
||||
patronGenreMenu = patronMenu
|
||||
action = 'peliculas'
|
||||
|
||||
return locals()
|
||||
|
||||
@@ -94,12 +94,12 @@ def episodios(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'
|
||||
# item.contentType = 'tvshow'
|
||||
elif item.args == 'serie':
|
||||
support.info("Serie :", item)
|
||||
patron = r'(?:>| )(?P<episode>\d+(?:x|×|×)\d+)[;]?[ ]?(?:(?P<title>[^<–-]+)(?P<data>.*?)|(\2[ ])(?:<(\3.*?)))(?:</a><br /|</a></p|$)'
|
||||
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)'
|
||||
item.contentType = 'tvshow'
|
||||
# item.contentType = 'tvshow'
|
||||
else:
|
||||
patron = r'(?P<title>\s*[0-9]{2}/[0-9]{2}/[0-9]{4})(?P<data>.*?)(?:<br|</p)'
|
||||
|
||||
@@ -116,7 +116,7 @@ def genres(item):
|
||||
|
||||
action='peliculas'
|
||||
patron_block=r'<div id="bordobar" class="dropdown-menu(?P<block>.*?)</li>'
|
||||
patronMenu=r'<a class="dropdown-item" href="(?P<url>[^"]+)" title="(?P<title>[A-z]+)"'
|
||||
patronGenreMenu=r'<a class="dropdown-item" href="(?P<url>[^"]+)" title="(?P<title>[A-z]+)"'
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
@@ -3,14 +3,12 @@
|
||||
# Canale per filmpertutti.py
|
||||
# ------------------------------------------------------------
|
||||
|
||||
from core import httptools, support
|
||||
from core import support
|
||||
from core.item import Item
|
||||
from platformcode import config
|
||||
from platformcode import config, logger
|
||||
|
||||
def findhost(url):
|
||||
page = httptools.downloadpage(url).data
|
||||
url = support.scrapertools.find_single_match(page, 'Il nuovo indirizzo di FILMPERTUTTI è ?<a href="([^"]+)')
|
||||
return url
|
||||
return support.match(url, patron=r'Il nuovo indirizzo di FILMPERTUTTI è ?<a href="([^"]+)', debug=True).match
|
||||
|
||||
host = config.get_channel_url(findhost)
|
||||
headers = [['Referer', host]]
|
||||
@@ -34,10 +32,6 @@ def mainlist(item):
|
||||
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
support.info()
|
||||
# debug = True
|
||||
#debugBlock = True
|
||||
# support.dbg()
|
||||
|
||||
if item.args != 'newest':
|
||||
patronBlock = r'<ul class="posts">(?P<block>.*)<\/ul>'
|
||||
@@ -48,13 +42,13 @@ def peliculas(item):
|
||||
patron = r'<li>\s?<a href="(?P<url>[^"]+)" data-thumbnail="(?P<thumb>[^"]+)">.*?<div class="title[^"]*">(?P<title>.+?)(?:\s\[(?P<quality>HD)\])?<\/div><div class="episode[^"]*"[^>]+>(?P<episode>[^<(]+)(?:\((?P<lang>[a-zA-Z\-]+)\))?'
|
||||
|
||||
if item.args == 'search':
|
||||
action = 'select'
|
||||
action = 'check'
|
||||
elif item.contentType == 'tvshow':
|
||||
action = 'episodios'
|
||||
elif item.contentType == 'movie':
|
||||
action ='findvideos'
|
||||
else:
|
||||
action = 'select'
|
||||
action = 'check'
|
||||
|
||||
def itemHook(item):
|
||||
item.title = item.title.replace(' - La Serie', '')
|
||||
@@ -64,7 +58,6 @@ def peliculas(item):
|
||||
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
# debug = True
|
||||
data = support.match(item.url, headers=headers).data
|
||||
if 'accordion-item' in data:
|
||||
patronBlock = r'<span class="season[^>]*>\d+[^>]+>[^>]+>[^>]+>[^>]+>\D*(?:STAGIONE|Stagione)[ -]+(?P<lang>[a-zA-Z\- ]+)[^<]*</span>(?P<block>.*?)<div id="(?:season|disqus)'
|
||||
@@ -92,27 +85,27 @@ def genres(item):
|
||||
|
||||
action = 'peliculas'
|
||||
patronBlock = r'<select class="cats">(?P<block>.*?)<\/select>'
|
||||
patronMenu = r'<option data-src="(?P<url>[^"]+)">(?P<title>[^<]+)<\/option>'
|
||||
patronGenreMenu = r'<option data-src="(?P<url>[^"]+)">(?P<title>[^<]+)<\/option>'
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
def select(item):
|
||||
support.info()
|
||||
def check(item):
|
||||
logger.debug()
|
||||
patron=r'class="taxonomy category"\s*><span property="name">([^>]+)</span></a><meta property="position" content="2">'
|
||||
block = support.match(item.url, patron=patron,headers=headers).match
|
||||
if block.lower() != 'film':
|
||||
support.info('select = ### è una serie ###')
|
||||
logger.debug('### è una Serie ###')
|
||||
item.contentType='tvshow'
|
||||
return episodios(item)
|
||||
else:
|
||||
support.info('select = ### è un movie ###')
|
||||
logger.debug(' ### è un Film ###')
|
||||
item.contentType='movie'
|
||||
return findvideos(item)
|
||||
|
||||
|
||||
def search(item, texto):
|
||||
support.info()
|
||||
logger.debug()
|
||||
item.url = host + "/?s=" + texto
|
||||
item.args = 'search'
|
||||
try:
|
||||
@@ -121,12 +114,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()
|
||||
logger.debug()
|
||||
itemlist = []
|
||||
item = Item()
|
||||
try:
|
||||
@@ -147,7 +140,7 @@ def newest(categoria):
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.info("{0}".format(line))
|
||||
logger.error("{0}".format(line))
|
||||
return []
|
||||
|
||||
return itemlist
|
||||
|
||||
@@ -140,7 +140,7 @@ def genres(item):
|
||||
info()
|
||||
|
||||
action = 'peliculas'
|
||||
patron = r'<li>\s<a\shref="(?P<url>[^"]+)"[^>]+>(?P<title>[^<]+)</a></li>'
|
||||
patronGenreMenu = r'<li>\s<a\shref="(?P<url>[^"]+)"[^>]+>(?P<title>[^<]+)</a></li>'
|
||||
patron_block = r'<ul\sclass="dropdown-menu category">(?P<block>.*?)</ul>'
|
||||
item.contentType = ''
|
||||
|
||||
|
||||
@@ -118,7 +118,7 @@ def genres(item):
|
||||
elif item.args == 'letter':
|
||||
patronBlock = r'<div class="movies-letter">(?P<block>.*?)<div class="clearfix">'
|
||||
|
||||
patronMenu = r'<a(?:.+?)?href="(?P<url>.*?)"[ ]?>(?P<title>.*?)<\/a>'
|
||||
patronGenreMenu = r'<a(?:.+?)?href="(?P<url>.*?)"[ ]?>(?P<title>.*?)<\/a>'
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
@@ -106,7 +106,7 @@ def episodios(item):
|
||||
@support.scrape
|
||||
def category(item):
|
||||
blacklist = ['Ultimi Film Aggiornati', 'Anime', 'Serie TV Altadefinizione', 'HD AltaDefinizione', 'Al Cinema', 'Serie TV', 'Miniserie', 'Programmi Tv', 'Live', 'Trailers', 'Serie TV Aggiornate', 'Aggiornamenti', 'Featured']
|
||||
patron = '<li><a href="(?P<url>[^"]+)"><span></span>(?P<title>[^<]+)</a></li>'
|
||||
patronGenreMenu = '<li><a href="(?P<url>[^"]+)"><span></span>(?P<title>[^<]+)</a></li>'
|
||||
patron_block = '<ul class="table-list">(.*?)</ul>'
|
||||
action = 'peliculas'
|
||||
|
||||
|
||||
@@ -176,6 +176,8 @@ def filterchannels(category, view="thumb_"):
|
||||
channelslist.sort(key=lambda item: item.title.lower().strip())
|
||||
|
||||
if not config.get_setting("only_channel_icons"):
|
||||
from core.support import thumb
|
||||
|
||||
if category == "all":
|
||||
channel_parameters = channeltools.get_channel_parameters('url')
|
||||
# If you prefer the banner and the channel has it, now change your mind
|
||||
@@ -186,21 +188,24 @@ def filterchannels(category, view="thumb_"):
|
||||
thumbnail=channel_parameters["thumbnail"], type="generic", viewmode="list"))
|
||||
# Special Category
|
||||
if category in ['movie', 'tvshow']:
|
||||
ch_list = []
|
||||
titles = [config.get_localized_string(70028), config.get_localized_string(30985), config.get_localized_string(70559), config.get_localized_string(60264), config.get_localized_string(70560)]
|
||||
ids = ['popular', 'top_rated', 'now_playing', 'on_air']
|
||||
for x in range(0,3):
|
||||
if x == 2 and category != 'movie':
|
||||
title=titles[x+1]
|
||||
title=titles[x+1] + '{tv}'
|
||||
id = ids[x+1]
|
||||
else:
|
||||
title=titles[x]
|
||||
title=titles[x] + '{movie}'
|
||||
id = ids[x]
|
||||
channelslist.insert(x,
|
||||
ch_list.insert(x,
|
||||
Item(channel='search', action='discover_list', title=title, search_type='list',
|
||||
list_type='%s/%s' % (category.replace('show',''), id), mode=category, thumbnail=get_thumb(id+".png")))
|
||||
list_type='%s/%s' % (category.replace('show',''), id), mode=category))
|
||||
|
||||
channelslist.insert(3, Item(channel='search', action='genres_menu', title=config.get_localized_string(30987),
|
||||
type=category.replace('show',''), mode=category ,thumbnail=get_thumb("genre.png")))
|
||||
|
||||
ch_list.insert(3, Item(channel='search', action='genres_menu', title=config.get_localized_string(30987) + '{' + category.replace('show','') + '}',
|
||||
type=category.replace('show',''), mode=category))
|
||||
channelslist = thumb(ch_list) + channelslist
|
||||
|
||||
return channelslist
|
||||
|
||||
|
||||
218
core/support.py
218
core/support.py
@@ -605,7 +605,7 @@ def dooplay_get_links(item, host, paramList=[]):
|
||||
for type, post, nume, title, server in matches:
|
||||
postData = urlencode({
|
||||
"action": "doo_player_ajax",
|
||||
"post": post,
|
||||
"post": post,
|
||||
"nume": nume,
|
||||
"type": type
|
||||
})
|
||||
@@ -941,7 +941,7 @@ def match(item_url_string, **args):
|
||||
if patronBlock:
|
||||
blocks = [scrapertools.find_single_match(data, patronBlock)]
|
||||
elif patronBlocks:
|
||||
if type(patronBlocks) == str:
|
||||
if type(patronBlocks) == str:
|
||||
patronBlocks = [patronBlocks]
|
||||
for p in patronBlocks:
|
||||
blocks += scrapertools.find_multiple_matches(data, p)
|
||||
@@ -1406,94 +1406,162 @@ def thumb(data=None, genre=False, live=False):
|
||||
data.thumbnail = "https://raw.githubusercontent.com/kodiondemand/media/master/live/" + data.fulltitle.lower().replace(' ','_') + '.png'
|
||||
return data
|
||||
|
||||
main_dict = {'movie':['film', 'movie', 'movies'],
|
||||
'tvshow':['serie','tv','episodi','episodio','fiction', 'show'],
|
||||
'anime':['anime'],
|
||||
'documentary':['documentari','documentario', 'documentary', 'documentaristico'],
|
||||
'music':['musical', 'musica', 'music', 'musicale'],
|
||||
}
|
||||
_movie = ['movie', 'movies', 'film', 'films']
|
||||
_tvshow = ['serie', 'tv', 'episodi', 'episodio', 'fiction', 'show', 'episode', 'episodes']
|
||||
_anime = ['anime']
|
||||
_documentary = ['documentario', 'documentari', 'documentary', 'documentaries', 'documentaristico']
|
||||
_music = ['musica', 'musicale', 'music', 'musical']
|
||||
_torrent = ['torrent']
|
||||
_live = ['corso', 'onda', 'diretta', 'dirette', 'progress', 'air', 'live']
|
||||
_year = ['anno', 'anni', 'year', 'years']
|
||||
_top = ['voto', 'voti', 'votato', 'votati', 'migliore', 'migliori', 'fortunato', 'classifica', 'classifiche', 'vote', 'voted', 'best', 'top', 'lucky', 'ranking', 'charts']
|
||||
_popular = ['popolare', 'popolari', 'raccomandato', 'raccomandati', 'raccomandazione', 'raccomandazioni', 'momento', 'popular', 'recommended', 'recommendation', 'recommendations', 'moment']
|
||||
_all = ['tutto', 'tutta', 'tutti', 'tutte' 'all']
|
||||
_az = ['lettera', 'lettere', 'lista', 'liste', 'alfabetico', 'a-z', 'letter', 'letters', 'list', 'alphabetical']
|
||||
_news = ['novità', "novita'", 'aggiornamenti', 'nuovo', 'nuova', 'nuovi', 'nuove', 'ultimo', 'ultima', 'ultimi', 'ultime', 'notizia', 'notizie', 'new', 'newest', 'last', 'latest', 'news']
|
||||
_cinema = ['cinema', 'sala', 'theatre', 'theatres']
|
||||
_genre = ['genere', 'generi', 'categoria', 'categorie', 'genre', 'genres', 'category', 'categories']
|
||||
_sub = ['sub', 'sub-ita', 'sottotitolato', 'sottotitolata', 'sottotitolati', 'originale', 'subtitled', 'original']
|
||||
_ita = ['ita', 'italiano']
|
||||
_update = ['aggiorno', 'aggiorna', 'aggiorni', 'aggiornare', 'update', 'replay']
|
||||
_videolibrary = ['videoteca', 'videoteche', 'teca', 'teche', 'library', 'videolibrary']
|
||||
_info = ['informazione', 'informazioni', 'info', 'information', 'informations']
|
||||
_star = ['attore', 'attrice', 'attori', 'attrici', 'regista', 'registi', 'personaggio', 'personaggi', 'interprete', 'interpreti', 'star', 'stars', 'character', 'characters', 'performer', 'performers', 'staff', 'actor', 'actors', 'actress', 'actresses', 'director', 'directors']
|
||||
_winter = ['inverno', 'winter']
|
||||
_spring = ['primavera', 'spring'],
|
||||
_summer = ['estate', 'summer'],
|
||||
_autumn = ['autunno', 'autumn'],
|
||||
_teenager = ['ragazzo', 'ragazza', 'ragazzi', 'ragazze','teenager', 'teen']
|
||||
_learning = ['imparare', 'scuola', 'learn', 'learning', 'school']
|
||||
_animation = ['animazione', 'cartoni', 'animation', 'cartoon']
|
||||
_action = ['azione', 'marziali', 'action', 'martial', 'samurai']
|
||||
_adventure = ['avventura', 'adventure']
|
||||
_biographic = ['biografia', 'biografico', 'bio', 'biographic', 'biographical']
|
||||
_comedy = ['comico', 'commedia', 'parodia', 'demenziale', 'brillante', 'comic', 'comical', 'comedy', 'parody', 'demential']
|
||||
_adult = ['erotico', 'hentai', 'harem', 'ecchi', 'adult']
|
||||
_drama = ['dramma', 'drammatico', 'drama']
|
||||
_syfy = ['fantascienza', 'science fiction', 'syfy', 'sci', 'fi']
|
||||
_fantasy = ['fantastico', 'magia', 'fantasy', 'magic']
|
||||
_crime = ['polizia', 'poliziesco', 'poliziottesco', 'crimine', 'criminale', 'police', 'crime', 'gangster']
|
||||
_grotesque = ['grottesco', 'grotesque']
|
||||
_war = ['guerra', 'militare', 'militari', 'war', 'military']
|
||||
_children = ['bambino', 'bambina', 'bambini', 'bambine', 'child', 'children', 'kids', 'baby', 'babies', 'boy', 'girl']
|
||||
_horror = ['orrore', 'paura', 'horror', 'fear']
|
||||
_mistery = ['mistero', 'giallo', 'mystery']
|
||||
_noir = ['noir']
|
||||
_thriller = ['thriller']
|
||||
_western = ['western']
|
||||
_romance = ['romantico', 'sentimentale', 'romance', 'soap']
|
||||
_family = ['famiglia','famiglie', 'family']
|
||||
_historical = ['storia', 'storico', 'history', 'historical']
|
||||
_hd = ['hd','altadefinizione','alta', '1080', '1080p', 'fullhd']
|
||||
_4k = ['4k']
|
||||
_setting = ['impostazioni', 'settaggi', 'configura', 'configurare', 'gestire', 'gestisci', 'gestione', 'setting', 'config']
|
||||
_talk = ['talk']
|
||||
_reality = ['reality']
|
||||
_quality = ['qualità', 'risoluzione', 'risoluzioni', 'quality', 'resolution', 'resolutions']
|
||||
|
||||
icon_dict = {'torrent':['torrent'],
|
||||
'all':['tutti', 'all'],
|
||||
'az':['lettera','lista','alfabetico','a-z', 'alphabetical'],
|
||||
'news':['novità', "novita'", 'aggiornamenti', 'nuovi', 'nuove', 'new', 'newest', 'news', 'ultimi', 'ultime', 'notizie'],
|
||||
'now_playing':['cinema', 'in sala'],
|
||||
'genre':['genere', 'generi', 'categorie', 'categoria', 'category'],
|
||||
'popular':['popolari', 'popolare', 'popular', 'più', 'raccomandati', 'raccomandazioni' 'recommendations'],
|
||||
'on_air' : ['corso', 'onda', 'diretta', 'dirette', 'progress'],
|
||||
'year':['anno', 'anni', 'year'],
|
||||
'update':['replay', 'update'],
|
||||
'videolibrary':['teche'],
|
||||
'info':['info','information','informazioni'],
|
||||
'star':['star', 'personaggi', 'interpreti', 'stars', 'characters', 'performers', 'staff', 'actors', 'attori'],
|
||||
'winter':['inverno', 'winter'],
|
||||
'spring':['primavera', 'spring'],
|
||||
'summer':['estate', 'summer'],
|
||||
'autumn':['autunno', 'autumn'],
|
||||
'vos':['sub','sub-ita'],
|
||||
'top_rated' : ['fortunato', 'votati', 'lucky', 'top'],
|
||||
main_dict = {'movie':_movie,
|
||||
'tvshow':_tvshow,
|
||||
'anime':_anime,
|
||||
'documentary':_documentary,
|
||||
'music':_music}
|
||||
|
||||
icon_dict = {'torrent':_torrent,
|
||||
'all':_all,
|
||||
'az':_az,
|
||||
'news':_news,
|
||||
'cinema':_cinema,
|
||||
'genre':_genre,
|
||||
'popular':_popular,
|
||||
'live':_live,
|
||||
'year':_year,
|
||||
'update':_update,
|
||||
'videolibrary':_videolibrary,
|
||||
'info':_info,
|
||||
'star':_star,
|
||||
'winter':_winter,
|
||||
'spring':_spring,
|
||||
'summer':_summer,
|
||||
'autumn':_autumn,
|
||||
'sub':_sub,
|
||||
'top':_top,
|
||||
'setting':_setting,
|
||||
'children':_children,
|
||||
'family':_family,
|
||||
'teenager':_teenager,
|
||||
'learning':_learning,
|
||||
'autoplay':[config.get_localized_string(60071)]
|
||||
}
|
||||
|
||||
genre_dict = {'documentary':['documentari','documentario', 'documentary', 'documentaristico'],
|
||||
'teenager':['ragazzi','teenager', 'teen'],
|
||||
'learning':['learning', 'school', 'scuola'],
|
||||
'animation': ['animazione', 'cartoni', 'cartoon', 'animation'],
|
||||
'action':['azione', 'marziali', 'action', 'martial', 'samurai'],
|
||||
'adventure': ['avventura', 'adventure'],
|
||||
'biographical':['biografico', 'biographical', 'biografia'],
|
||||
'comedy':['comico', 'commedia', 'demenziale', 'comedy', 'brillante', 'demential', 'parody', 'parodia'],
|
||||
'adult':['erotico', 'hentai', 'harem', 'ecchi', 'adult'],
|
||||
'drama':['drammatico', 'drama', 'dramma'],
|
||||
'syfy':['fantascienza', 'science fiction', 'syfy', 'sci-fi'],
|
||||
'fantasy':['fantasy', 'magia', 'magic', 'fantastico'],
|
||||
'crime':['gangster','poliziesco', 'crime', 'crimine', 'police', 'polizia'],
|
||||
'grotesque':['grottesco', 'grotesque'],
|
||||
'war':['guerra', 'war', 'military', 'militari'],
|
||||
'children':['bambini', 'kids'],
|
||||
'horror':['horror', 'orrore', 'demoni', 'vampiri'],
|
||||
'music':['musical', 'musica', 'music', 'musicale'],
|
||||
'mistery':['mistero', 'giallo', 'mystery'],
|
||||
'noir':['noir'],
|
||||
'thriller':['thriller'],
|
||||
'western':['western'],
|
||||
'romance':['romantico','sentimentale', 'romance', 'soap'],
|
||||
'family':['famiglia','famiglie', 'family'],
|
||||
'historical':['storico', 'history', 'storia', 'historical'],
|
||||
'tvmovie':['tv', 'show', 'film tv', 'tv movie']}
|
||||
genre_dict = {'documentary':_documentary,
|
||||
'teenager':_teenager,
|
||||
'learning':_learning,
|
||||
'animation':_animation,
|
||||
'action':_action,
|
||||
'adventure':_adventure,
|
||||
'biographic':_biographic,
|
||||
'comedy':_comedy,
|
||||
'adult':_adult,
|
||||
'drama':_drama,
|
||||
'syfy':_syfy,
|
||||
'fantasy':_fantasy,
|
||||
'crime':_crime,
|
||||
'grotesque':_grotesque,
|
||||
'war':_war,
|
||||
'children':_children,
|
||||
'horror':_horror,
|
||||
'music':_music,
|
||||
'mistery':_mistery,
|
||||
'noir':_noir,
|
||||
'thriller':_thriller,
|
||||
'western':_western,
|
||||
'romance':_romance,
|
||||
'family':_family,
|
||||
'historical':_historical,
|
||||
'news':_news,
|
||||
'talk':_talk,
|
||||
'reality':_reality,
|
||||
'tvmovie':_movie}
|
||||
|
||||
suffix_dict = {'_hd':['hd','altadefinizione','alta definizione'],
|
||||
'_4k':['4K'],
|
||||
'_az':['lettera','lista','alfabetico','a-z', 'alphabetical'],
|
||||
'_genre':['genere', 'generi', 'categorie', 'categoria', 'genre', 'genres'],
|
||||
'_popular':['popolari', 'popolare', 'popular', 'più', 'raccomandati', 'raccomandazioni' 'recommendations'],
|
||||
'_top':['fortunato', 'votati', 'lucky', 'top'],
|
||||
'_year':['anno', 'anni', 'year'],
|
||||
'_news':['novità', "novita'", 'aggiornamenti', 'nuovi', 'nuove', 'new', 'newest', 'news', 'ultimi', 'ultime', 'notizie'],
|
||||
'_on_air' : ['corso', 'onda', 'diretta', 'dirette', 'progress'],
|
||||
'_cinema':['cinema', 'sala', 'theatre', 'theatres']}
|
||||
suffix_dict = {'_hd':_hd,
|
||||
'_4k':_4k,
|
||||
'_az':_az,
|
||||
'_genre':_genre,
|
||||
'_popular':_popular,
|
||||
'_top':_top,
|
||||
'_year':_year,
|
||||
'_news':_news,
|
||||
'_live':_live,
|
||||
'_sub':_sub,
|
||||
'_ita':_ita,
|
||||
'_quality':_quality,
|
||||
'_cinema':_cinema}
|
||||
|
||||
search = ['cerca', 'search']
|
||||
search = ['cerca', 'cercare', 'ricerca', 'ricercare', 'trova', 'trovare', 'search', 'searching', 'find', 'finding']
|
||||
|
||||
search_suffix ={'_movie':['film', 'movie', 'movies'],
|
||||
'_tvshow':['serie','tv','episodi','episodio','fiction', 'show'],
|
||||
'_anime':['anime'],
|
||||
'_year':['anno', 'anni', 'year'],
|
||||
'_rating':['rating', 'voto'],
|
||||
'_documentary':['documentari','documentario', 'documentary', 'documentaristico'],
|
||||
'_music':['musical', 'musica', 'music', 'musicale'],
|
||||
'_star':['star', 'personaggi', 'interpreti', 'stars', 'characters', 'performers', 'staff', 'actors', 'attori', 'regista', 'registi'],
|
||||
'_genre':['genere', 'generi', 'categorie', 'categoria', 'genre', 'genres']}
|
||||
search_suffix ={'_movie':_movie,
|
||||
'_tvshow':_tvshow,
|
||||
'_anime':_anime,
|
||||
'_year':_year,
|
||||
'_top':_top,
|
||||
'_documentary':_documentary,
|
||||
'_music':_music,
|
||||
'_star':_star,
|
||||
'_genre':_genre}
|
||||
|
||||
def autoselect_thumb(item, genre):
|
||||
searched_title = re.split(r'\.|\{|\}|\[|\]|\(|\)|/| ', scrapertools.unescape(re.sub('\[[^\]]+\]|\u2026|\u2022', '', item.title.lower().replace('/',' '))))
|
||||
searched_title = re.split(r'\.|\{|\}|\(|\)|/| ', scrapertools.unescape(re.sub('\[[^\]]*\]||\u2026|\u2022','', item.title.lower())))
|
||||
logger.debug('SEARCED', searched_title)
|
||||
thumb = ''
|
||||
if genre:
|
||||
for t, titles in genre_dict.items():
|
||||
if any(word in searched_title for word in titles ):
|
||||
thumb = t
|
||||
else:
|
||||
if any(word in searched_title for word in search):
|
||||
if any(word in searched_title for word in _setting):
|
||||
thumb = 'setting'
|
||||
elif any(word in searched_title for word in search):
|
||||
thumb = 'search'
|
||||
for suffix, titles in search_suffix.items():
|
||||
if any(word in searched_title for word in titles):
|
||||
|
||||
@@ -398,10 +398,13 @@ def render_items(itemlist, parent_item):
|
||||
listitem.setProperty('IsPlayable', 'true')
|
||||
|
||||
if item.infoLabels.get('castandrole'):
|
||||
cast = [{'name':c[0], 'role':c[1], 'thumbnail':c[2], 'order':c[3]} for c in item.infoLabels.get("castandrole", [])]
|
||||
cast.sort(key=lambda c: c['order'])
|
||||
listitem.setCast(cast)
|
||||
del item.infoLabels['castandrole']
|
||||
try:
|
||||
cast = [{'name':c[0], 'role':c[1], 'thumbnail':c[2], 'order':c[3]} for c in item.infoLabels.get("castandrole", [])]
|
||||
cast.sort(key=lambda c: c['order'])
|
||||
listitem.setCast(cast)
|
||||
del item.infoLabels['castandrole']
|
||||
except:
|
||||
pass
|
||||
|
||||
set_infolabels(listitem, item)
|
||||
|
||||
@@ -686,7 +689,7 @@ def set_context_commands(item, item_url, parent_item, **kwargs):
|
||||
# Add Movie to Video Library
|
||||
elif item.action in ["detail", "findvideos"] and item.contentType == 'movie' and item.contentTitle:
|
||||
context_commands.append((config.get_localized_string(60353), "RunPlugin(%s?%s&%s)" % (sys.argv[0], item_url, 'action=add_movie_to_library&from_action=' + item.action)))
|
||||
elif item.action in ['check'] and item.contentTitle:
|
||||
elif item.action in ['check'] and item.contentTitle or item.contentSerieName:
|
||||
context_commands.append((config.get_localized_string(30161), "RunPlugin(%s?%s&%s)" % (sys.argv[0], item_url, 'action=add_to_library&from_action=' + item.action)))
|
||||
|
||||
if not item.local and item.channel not in ["downloads", "filmontv", "search"] and item.server != 'torrent' and parent_item.action != 'mainlist' and config.get_setting('downloadenabled'):
|
||||
|
||||
@@ -201,12 +201,11 @@ def mainlist(item):
|
||||
|
||||
plot = str(len(perfil['items'])) + " " + config.get_localized_string(70723)
|
||||
itemlist.append(Item(channel=item.channel, action='mostrar_perfil', title=perfil['title'], plot=plot, i_perfil=i_perfil, context=context, thumbnail=support.thumb('mylink.png')))
|
||||
support.thumb(itemlist)
|
||||
itemlist.append(item.clone(action='crear_perfil', title=config.get_localized_string(70542), folder=False, thumbnail=support.thumb('more')))
|
||||
itemlist.append(item.clone(action='mainlist_listas', title=config.get_localized_string(70603), thumbnail=support.thumb('setting')))
|
||||
|
||||
itemlist.append(item.clone(action='crear_perfil', title=config.get_localized_string(70542), folder=False))
|
||||
|
||||
itemlist.append(item.clone(action='mainlist_listas', title=config.get_localized_string(70603)))
|
||||
|
||||
return support.thumb(itemlist)
|
||||
return itemlist
|
||||
|
||||
|
||||
def mostrar_perfil(item):
|
||||
|
||||
@@ -51,9 +51,8 @@ def mainlist(item):
|
||||
channel_language = auto_filter()
|
||||
|
||||
#if list_canales['peliculas']:
|
||||
thumbnail = get_thumb("movie.png")
|
||||
new_item = Item(channel=item.channel, action="novedades", extra="peliculas", title=config.get_localized_string(30122),
|
||||
thumbnail=thumbnail)
|
||||
# thumbnail = get_thumb("movie.png")
|
||||
new_item = Item(channel=item.channel, action="novedades", extra="peliculas", title=config.get_localized_string(30122) + '{news}')
|
||||
|
||||
set_category_context(new_item)
|
||||
itemlist.append(new_item)
|
||||
@@ -79,16 +78,12 @@ def mainlist(item):
|
||||
# itemlist.append(new_item)
|
||||
|
||||
#if list_canales['series']:
|
||||
thumbnail = get_thumb("tvshow.png")
|
||||
new_item = Item(channel=item.channel, action="novedades", extra="series", title=config.get_localized_string(60511),
|
||||
thumbnail=thumbnail)
|
||||
new_item = Item(channel=item.channel, action="novedades", extra="series", title=config.get_localized_string(60511) + '{news}')
|
||||
set_category_context(new_item)
|
||||
itemlist.append(new_item)
|
||||
|
||||
#if list_canales['anime']:
|
||||
thumbnail = get_thumb("anime.png")
|
||||
new_item = Item(channel=item.channel, action="novedades", extra="anime", title=config.get_localized_string(60512),
|
||||
thumbnail=thumbnail)
|
||||
new_item = Item(channel=item.channel, action="novedades", extra="anime", title=config.get_localized_string(60512) + '{news}')
|
||||
set_category_context(new_item)
|
||||
itemlist.append(new_item)
|
||||
|
||||
@@ -112,10 +107,9 @@ def mainlist(item):
|
||||
# thumbnail=thumbnail)
|
||||
# set_category_context(new_item)
|
||||
# itemlist.append(new_item)
|
||||
thumbnail = get_thumb("setting_0.png")
|
||||
itemlist.append(Item(channel='shortcuts', action="SettingOnPosition", category=7, setting=1,
|
||||
title=typo(config.get_localized_string(70285), 'bold color kod'), thumbnail=thumbnail))
|
||||
|
||||
title=typo(config.get_localized_string(70285), 'bold color kod')))
|
||||
support.thumb(itemlist)
|
||||
return itemlist
|
||||
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ def mainlist(item):
|
||||
itemlist += [Item(channel=item.channel, title=config.get_localized_string(59995), action='saved_search', thumbnail=get_thumb('search.png')),
|
||||
Item(channel=item.channel, title=config.get_localized_string(60420), action='sub_menu', thumbnail=get_thumb('search.png')),
|
||||
Item(channel="tvmoviedb", title=config.get_localized_string(70274), action="mainlist", thumbnail=get_thumb("search.png")),
|
||||
Item(channel=item.channel, title=typo(config.get_localized_string(59994), 'color kod bold'), action='setting_channel_new', thumbnail=get_thumb('setting_0.png'), folder=False),
|
||||
Item(channel=item.channel, title=typo(config.get_localized_string(59994) + '{config}', 'color kod bold'), action='setting_channel_new', thumbnail=get_thumb('setting_0.png'), folder=False),
|
||||
Item(channel='shortcuts', title=typo(config.get_localized_string(70286), 'color kod bold'), action='SettingOnPosition', category=5, setting=1, thumbnail=get_thumb('setting_0.png'), folder=False)]
|
||||
|
||||
itemlist = set_context(itemlist)
|
||||
@@ -572,7 +572,7 @@ def genres_menu(item):
|
||||
action='discover_list', discovery=discovery,
|
||||
mode=item.mode))
|
||||
from core import support
|
||||
support.thumb(itemlist)
|
||||
support.thumb(itemlist, genre=True)
|
||||
return sorted(itemlist, key=lambda it: it.title)
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
from core import filetools, jsontools, trakt_tools
|
||||
from core import support
|
||||
from core.tmdb import Tmdb
|
||||
from core.scrapertools import htmlclean, decodeHtmlentities
|
||||
from core.support import thumb, typo, match, Item
|
||||
@@ -32,20 +33,21 @@ def mainlist(item):
|
||||
itemlist = [
|
||||
# TMDB
|
||||
# item.clone(title=typo(config.get_localized_string(70021), 'bold'), action=""),
|
||||
item.clone(title=config.get_localized_string(70021) % (config.get_localized_string(30122), 'TMDB'), action="tmdb", args="movie", thumbnail=thumb('search_movie')),
|
||||
item.clone(title=config.get_localized_string(70021) % (config.get_localized_string(30123), 'TMDB'), action="tmdb", args="tv", thumbnail=thumb('search_tvshow')),
|
||||
item.clone(title=config.get_localized_string(70021) % (config.get_localized_string(30122), 'TMDB'), action="tmdb", args="movie"),
|
||||
item.clone(title=config.get_localized_string(70021) % (config.get_localized_string(30123), 'TMDB'), action="tmdb", args="tv"),
|
||||
# Filmaffinity
|
||||
# itemlist.append(item.clone(title=typo(config.get_localized_string(70024), 'bold'), action=""))
|
||||
# itemlist.append(item.clone(title=config.get_localized_string(70022), action="filmaf", args="movie", thumbnail=thumb('search_movie')))
|
||||
# itemlist.append(item.clone(title=config.get_localized_string(70023), action="filmaf", args="tv", thumbnail=thumb('search_tvshow')))
|
||||
# IMDB
|
||||
# item.clone(title=typo(config.get_localized_string(70025), 'bold'), action=""),
|
||||
item.clone(title=config.get_localized_string(70021) % (config.get_localized_string(30122), 'IMDB'), action="imdb", args="movie", url='&title_type=feature,tv_movie', thumbnail=thumb('search_movie')),
|
||||
item.clone(title=config.get_localized_string(70021) % (config.get_localized_string(30123), 'IMDB'), action="imdb", args="tv", url='&title_type=tv_series,tv_special,mini_series', thumbnail=thumb('search_tvshow')),
|
||||
item.clone(title=config.get_localized_string(70021) % (config.get_localized_string(30122), 'IMDB'), action="imdb", args="movie", url='&title_type=feature,tv_movie'),
|
||||
item.clone(title=config.get_localized_string(70021) % (config.get_localized_string(30123), 'IMDB'), action="imdb", args="tv", url='&title_type=tv_series,tv_special,mini_series'),
|
||||
item.clone(title=config.get_localized_string(70415), action="trakt", thumbnail="http://i.imgur.com/5sQjjuk.png"),
|
||||
item.clone(title=config.get_localized_string(70026), action="mal", thumbnail="http://i.imgur.com/RhsYWmd.png"),
|
||||
item.clone(title=typo(config.get_localized_string(70027), 'color kod'), action="configuracion", folder=False)
|
||||
]
|
||||
support.thumb(itemlist)
|
||||
return itemlist
|
||||
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ def mainlist(item):
|
||||
item.clone(title=typo(config.get_localized_string(70741) % config.get_localized_string(30123) + '...', 'submenu'),contentType='tvshow', action='search_list', thumbnail=thumb('search_tvshow')),
|
||||
item.clone(channel='shortcuts', title=typo(config.get_localized_string(70287),'bold color kod'), action='SettingOnPosition',
|
||||
category=2, setting=1, thumbnail = thumb('setting_0'),folder=False)]
|
||||
support.thumb(itemlist)
|
||||
return itemlist
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user