fix ricerca ilgenio, aggiunto cerca trailer dove mancava e altri piccole modifiche
This commit is contained in:
@@ -42,7 +42,7 @@
|
||||
"hd4me": "https://hd4me.net",
|
||||
"ilgeniodellostreaming": "https://ilgeniodellostreaming.fi",
|
||||
"ilgeniodellostreaming_cam": "https://ilgeniodellostreaming.tel",
|
||||
"italiaserie": "https://italiaserie.org",
|
||||
"italiaserie": "https://italiaserie.eu",
|
||||
"mondoserietv": "https://mondoserietv.fun",
|
||||
"piratestreaming": "https://www.piratestreaming.buzz",
|
||||
"polpotv": "https://polpotv.life",
|
||||
|
||||
@@ -128,16 +128,25 @@ def search(item, text):
|
||||
info(text)
|
||||
itemlist = []
|
||||
text = text.replace(' ', '+')
|
||||
item.url = host + "/search/" + text
|
||||
try:
|
||||
item.args = 'search'
|
||||
return peliculas(item)
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
info("%s" % line)
|
||||
|
||||
return []
|
||||
item.url = host + "/wp-json/wp/v2/search?search=" + text
|
||||
results = support.httptools.downloadpage(item.url).json
|
||||
for r in results:
|
||||
title = r['title']
|
||||
longtitle = support.typo(title, 'bold')
|
||||
if '[sub-ita]' in title.lower():
|
||||
longtitle += support.typo('Sub-ITA', '_ [] color kod')
|
||||
title = title.split('[')[0]
|
||||
itemlist.append(item.clone(action='findvideos' if r['subtype'] == 'movies' else 'episodios',
|
||||
title=longtitle,
|
||||
fulltitle=title,
|
||||
show=title,
|
||||
contentTitle=title,
|
||||
contentSerieName=title,
|
||||
contentType='movie' if r['subtype'] == 'movies' else 'tvshow',
|
||||
url=r['url']))
|
||||
# support.dbg()
|
||||
support.tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
return itemlist
|
||||
|
||||
def newest(categoria):
|
||||
info(categoria)
|
||||
|
||||
@@ -502,7 +502,7 @@ def set_context_commands(item, item_url, parent_item, **kwargs):
|
||||
if item.channel not in ["favorites", "videolibrary", "help", ""] and parent_item.channel != "favorites":
|
||||
context_commands.append( (config.get_localized_string(70557), "RunPlugin(%s?%s&%s)" % (sys.argv[0], item_url, urllib.urlencode({'channel': "kodfavorites", 'action': "addFavourite", 'from_channel': item.channel, 'from_action': item.action}))))
|
||||
# Search in other channels
|
||||
if item.contentType in ['movie', 'tvshow'] and item.channel != 'search' and item.action not in ['play'] and parent_item.action != 'mainlist':
|
||||
if item.contentTitle and item.contentType in ['movie', 'tvshow'] and item.channel != 'search' and item.action not in ['play'] and parent_item.action != 'mainlist':
|
||||
|
||||
# Search in other channels
|
||||
if item.contentSerieName != '':
|
||||
@@ -551,8 +551,8 @@ def set_context_commands(item, item_url, parent_item, **kwargs):
|
||||
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)))
|
||||
|
||||
# Open settings...
|
||||
if item.action in ["findvideos", 'episodios', 'check', 'new_search'] or "buscar_trailer" in context:
|
||||
# Search trailer...
|
||||
if (item.contentTitle and item.contentType in ['movie', 'tvshow']) or "buscar_trailer" in context:
|
||||
context_commands.append((config.get_localized_string(60359), "RunPlugin(%s?%s)" % (sys.argv[0], urllib.urlencode({ 'channel': "trailertools", 'action': "buscartrailer", 'search_title': item.contentTitle if item.contentTitle else item.fulltitle, 'contextual': True}))))
|
||||
|
||||
if kwargs.get('superfavourites'):
|
||||
|
||||
@@ -353,7 +353,7 @@ def get_channel_results(item, module_dict, search_action):
|
||||
if len(results) == 1:
|
||||
if not results[0].action or config.get_localized_string(70006).lower() in results[0].title.lower():
|
||||
results.clear()
|
||||
elif item.mode != 'all':
|
||||
if item.mode != 'all':
|
||||
for elem in results:
|
||||
if not elem.infoLabels.get('year', ""):
|
||||
elem.infoLabels['year'] = '-'
|
||||
|
||||
Reference in New Issue
Block a user