KoD 0.6
-Nuova ricerca globale -migliorie prestazionali in generale -fix vari ai server
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
import os
|
||||
import sys
|
||||
|
||||
from specials import resolverdns
|
||||
|
||||
import urllib2
|
||||
|
||||
from core import channeltools
|
||||
@@ -35,6 +35,7 @@ def start():
|
||||
# se lo ha: non lo fa entrare nell'addon
|
||||
# se ha problemi di DNS avvia ma lascia entrare
|
||||
# se tutto ok: entra nell'addon
|
||||
from specials import resolverdns
|
||||
from specials.checkhost import test_conn
|
||||
import threading
|
||||
threading.Thread(target=test_conn, args=(True, True, True, [], [], True)).start()
|
||||
@@ -270,20 +271,11 @@ def run(item=None):
|
||||
elif item.action == "search":
|
||||
logger.info("item.action=%s" % item.action.upper())
|
||||
|
||||
last_search = ""
|
||||
last_search_active = config.get_setting("last_search", "search")
|
||||
if last_search_active:
|
||||
try:
|
||||
current_saved_searches_list = list(config.get_setting("saved_searches_list", "search"))
|
||||
last_search = current_saved_searches_list[0]
|
||||
except:
|
||||
pass
|
||||
last_search = channeltools.get_channel_setting('Last_searched', 'search', '')
|
||||
|
||||
tecleado = platformtools.dialog_input(last_search)
|
||||
if tecleado is not None:
|
||||
if last_search_active and not tecleado.startswith("http"):
|
||||
from specials import search
|
||||
search.save_search(tecleado)
|
||||
channeltools.set_channel_setting('Last_searched', tecleado, 'search')
|
||||
|
||||
if 'search' in dir(channel):
|
||||
itemlist = channel.search(item, tecleado)
|
||||
|
||||
@@ -558,23 +558,27 @@ def set_context_commands(item, parent_item):
|
||||
|
||||
# Buscar en otros canales
|
||||
if item.contentType in ['movie', 'tvshow'] and item.channel != 'search':
|
||||
|
||||
|
||||
# Buscar en otros canales
|
||||
if item.contentSerieName != '':
|
||||
item.wanted = item.contentSerieName
|
||||
else:
|
||||
item.wanted = item.contentTitle
|
||||
context_commands.append((config.get_localized_string(60350),
|
||||
"XBMC.Container.Update (%s?%s)" % (sys.argv[0],
|
||||
item.clone(channel='search',
|
||||
action="do_search",
|
||||
from_channel=item.channel,
|
||||
contextual=True).tourl())))
|
||||
|
||||
if item.contentType == 'tvshow':
|
||||
mediatype = 'tv'
|
||||
else:
|
||||
mediatype = item.contentType
|
||||
context_commands.append((config.get_localized_string(60350),
|
||||
"XBMC.Container.Update (%s?%s)" % (sys.argv[0],
|
||||
item.clone(channel='search',
|
||||
action="from_context",
|
||||
from_channel=item.channel,
|
||||
contextual=True,
|
||||
text=item.wanted).tourl())))
|
||||
context_commands.append(("[B]%s[/B]" % config.get_localized_string(70561), "XBMC.Container.Update (%s?%s)" % (
|
||||
sys.argv[0], item.clone(channel='search', action='discover_list', search_type='list', page='1',
|
||||
sys.argv[0], item.clone(channel='search', action='from_context', search_type='list', page='1',
|
||||
list_type='%s/%s/similar' % (mediatype,item.infoLabels['tmdb_id'])).tourl())))
|
||||
|
||||
# Definir como Pagina de inicio
|
||||
|
||||
@@ -90,7 +90,7 @@ def check_addon_init():
|
||||
localCommitFile.close()
|
||||
c['sha'] = updateFromZip('Aggiornamento in corso...')
|
||||
localCommitFile = open(addonDir + trackingFile, 'w') # il file di tracking viene eliminato, lo ricreo
|
||||
changelog += commitJson['commit']['message'] + " | "
|
||||
changelog += commitJson['commit']['message'] + "\n"
|
||||
nCommitApplied += 3 # il messaggio sarà lungo, probabilmente, il tempo di vis. è maggiorato
|
||||
break
|
||||
|
||||
@@ -145,11 +145,10 @@ def check_addon_init():
|
||||
filetools.move(addonDir + file['previous_filename'], addonDir + file['filename'])
|
||||
alreadyApplied = False
|
||||
if not alreadyApplied: # non mando notifica se già applicata (es. scaricato zip da github)
|
||||
changelog += commitJson['commit']['message'] + " | "
|
||||
changelog += commitJson['commit']['message'] + "\n"
|
||||
nCommitApplied += 1
|
||||
if addon.getSetting("addon_update_message"):
|
||||
time = nCommitApplied * 2000 if nCommitApplied < 10 else 20000
|
||||
platformtools.dialog_notification('Kodi on Demand', 'Aggiornamenti applicati:\n' + changelog[:-3], time)
|
||||
platformtools.dialog_ok('Kodi on Demand', 'Aggiornamenti applicati:\n' + changelog)
|
||||
|
||||
localCommitFile.seek(0)
|
||||
localCommitFile.truncate()
|
||||
|
||||
Reference in New Issue
Block a user