Modifiche a scrape e fix in channelselector

This commit is contained in:
Alhaziel
2019-07-29 20:57:10 +02:00
parent 6966036c99
commit 5feb40590b
2 changed files with 14 additions and 11 deletions

View File

@@ -345,13 +345,13 @@ def thumb(itemlist=[]):
'now_playing':['cinema', 'in sala'],
'channels_anime':['anime'],
'genres':['genere', 'generi', 'categorie', 'categoria'],
'channels_animation': ['animazione', 'cartoni'],
'channels_adventure': ['avventura'],
'channels_animation': ['animazione', 'cartoni', 'cartoon'],
'channels_action':['azione', 'arti marziali'],
'channels_adventure': ['avventura'],
'channels_biographical':['biografico'],
'channels_comedy':['comico','commedia', 'demenziale'],
'channels_adult':['erotico', 'hentai'],
'channels_drama':['drammatico'],
'channels_drama':['drammatico', 'drama'],
'channels_syfy':['fantascienza'],
'channels_fantasy':['fantasy'],
'channels_crime':['gangster','poliziesco'],
@@ -385,7 +385,7 @@ def thumb(itemlist=[]):
search_suffix ={'_movie':['film'],
'_tvshow':['serie','tv']}
for item in itemlist:
# Check if item has args propriety
if item.args: item.title = item.title + ' || ' + str(item.args)
@@ -401,7 +401,8 @@ def thumb(itemlist=[]):
for suffix, titles in suffix_dict.items():
if any( word in item.title.lower() for word in titles ):
thumb = thumb + suffix
item.thumbnail = get_thumb(thumb + '.png')
else:
item.thumbnail = get_thumb(thumb + '.png')
else:
thumb = item.thumbnails

View File

@@ -52,7 +52,7 @@ def hdpass_get_servers(item):
for media_label, media_url in scrapertoolsV2.find_multiple_matches(data, patron_media):
itemlist.append(Item(channel=item.channel,
action="play",
title=item.title+" ["+color(server, 'orange')+"]"+" - "+color(res_video, 'limegreen'),
title=item.title + typo(server, '-- [] color kod') + typo(res_video, '-- [] color kod'),
fulltitle=item.fulltitle,
quality=res_video,
show=item.show,
@@ -107,7 +107,7 @@ def search(channel, item, texto):
def dbg():
import webbrowser
webbrowser.open('localhost:5555')
webbrowser.open('http://localhost:5555')
import web_pdb;
web_pdb.set_trace()
@@ -315,7 +315,7 @@ def scrape(func):
itemlist.append(it)
checkHost(item, itemlist)
if (item.contentType == "tvshow" and (action != "findvideos" and action != "play")) \
if ('thumb' not in args and item.contentType == "tvshow" and (action == "findvideos" and action != "play")) \
or (item.contentType == "episode" and action != "play") \
or (item.contentType == "movie" and action != "play") :
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
@@ -349,6 +349,9 @@ def scrape(func):
if addVideolibrary and (item.infoLabels["title"] or item.fulltitle):
item.fulltitle = item.infoLabels["title"]
videolibrary(itemlist, item)
if 'thumb' in args:
itemlist = thumb(itemlist)
if 'fullItemlistHook' in args:
itemlist = args['fullItemlistHook'](itemlist)
@@ -512,8 +515,7 @@ def menuItem(itemlist, filename, title='', action='', url='', contentType='movie
url = url,
extra = extra,
args = args,
contentType = contentType,
folder = False,
contentType = contentType
))
# Apply auto Thumbnails at the menus
@@ -693,7 +695,7 @@ def match(item, patron='', patronBlock='', headers='', url=''):
matches = scrapertoolsV2.find_multiple_matches(block, patron)
log('MATCHES= ',matches)
return matches, data
return matches, block
def videolibrary(itemlist, item, typography='', function_level=1):