fix ricerca ilgenio, aggiunto cerca trailer dove mancava e altri piccole modifiche

This commit is contained in:
mac12m99
2020-11-01 14:17:58 +01:00
committed by marco
parent ec916a073b
commit 94e0a2ca99
4 changed files with 24 additions and 15 deletions

View File

@@ -42,7 +42,7 @@
"hd4me": "https://hd4me.net", "hd4me": "https://hd4me.net",
"ilgeniodellostreaming": "https://ilgeniodellostreaming.fi", "ilgeniodellostreaming": "https://ilgeniodellostreaming.fi",
"ilgeniodellostreaming_cam": "https://ilgeniodellostreaming.tel", "ilgeniodellostreaming_cam": "https://ilgeniodellostreaming.tel",
"italiaserie": "https://italiaserie.org", "italiaserie": "https://italiaserie.eu",
"mondoserietv": "https://mondoserietv.fun", "mondoserietv": "https://mondoserietv.fun",
"piratestreaming": "https://www.piratestreaming.buzz", "piratestreaming": "https://www.piratestreaming.buzz",
"polpotv": "https://polpotv.life", "polpotv": "https://polpotv.life",

View File

@@ -128,16 +128,25 @@ def search(item, text):
info(text) info(text)
itemlist = [] itemlist = []
text = text.replace(' ', '+') text = text.replace(' ', '+')
item.url = host + "/search/" + text item.url = host + "/wp-json/wp/v2/search?search=" + text
try: results = support.httptools.downloadpage(item.url).json
item.args = 'search' for r in results:
return peliculas(item) title = r['title']
except: longtitle = support.typo(title, 'bold')
import sys if '[sub-ita]' in title.lower():
for line in sys.exc_info(): longtitle += support.typo('Sub-ITA', '_ [] color kod')
info("%s" % line) title = title.split('[')[0]
itemlist.append(item.clone(action='findvideos' if r['subtype'] == 'movies' else 'episodios',
return [] 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): def newest(categoria):
info(categoria) info(categoria)

View File

@@ -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": 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})))) 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 # 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 # Search in other channels
if item.contentSerieName != '': if item.contentSerieName != '':
@@ -551,8 +551,8 @@ def set_context_commands(item, item_url, parent_item, **kwargs):
elif item.contentType == "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))) 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... # Search trailer...
if item.action in ["findvideos", 'episodios', 'check', 'new_search'] or "buscar_trailer" in context: 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})))) 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'): if kwargs.get('superfavourites'):

View File

@@ -353,7 +353,7 @@ def get_channel_results(item, module_dict, search_action):
if len(results) == 1: if len(results) == 1:
if not results[0].action or config.get_localized_string(70006).lower() in results[0].title.lower(): if not results[0].action or config.get_localized_string(70006).lower() in results[0].title.lower():
results.clear() results.clear()
elif item.mode != 'all': if item.mode != 'all':
for elem in results: for elem in results:
if not elem.infoLabels.get('year', ""): if not elem.infoLabels.get('year', ""):
elem.infoLabels['year'] = '-' elem.infoLabels['year'] = '-'