Merge branch 'stable' into stable

This commit is contained in:
mac12m99
2019-11-01 21:30:27 +01:00
committed by GitHub
201 changed files with 5075 additions and 4327 deletions

View File

@@ -37,8 +37,10 @@ def start():
from specials.checkhost import test_conn
import threading
threading.Thread(target=test_conn, args=(True, True, True, [], [], True)).start()
# check_adsl = test_conn(is_exit = True, check_dns = True, view_msg = True,
# lst_urls = [], lst_site_check_dns = [], in_addon = True)
def run(item=None):
logger.info()
if not item:
@@ -58,7 +60,7 @@ def run(item=None):
config.get_localized_string(70018): 'infantiles',
config.get_localized_string(60513): 'documentales',
config.get_localized_string(70013): 'terror',
config.get_localized_string(30124): 'castellano',
config.get_localized_string(70014): 'castellano',
config.get_localized_string(59976): 'latino',
config.get_localized_string(70171): 'torrent',
}
@@ -129,7 +131,9 @@ def run(item=None):
from core import tmdb
if tmdb.drop_bd():
platformtools.dialog_notification(config.get_localized_string(20000), config.get_localized_string(60011), time=2000, sound=False)
elif item.action == "itemInfo":
import base64
platformtools.dialog_textviewer('Item info', item.parent)
# Action in certain channel specified in "action" and "channel" parameters
else:
# Entry point for a channel is the "mainlist" action, so here we check parental control
@@ -260,7 +264,11 @@ def run(item=None):
from specials import search
search.save_search(tecleado)
itemlist = channel.search(item, tecleado)
if 'search' in dir(channel):
itemlist = channel.search(item, tecleado)
else:
from core import support
itemlist = support.search(channel, item, tecleado)
else:
return

View File

@@ -596,7 +596,7 @@ def set_context_commands(item, parent_item):
(sys.argv[0], item.clone(action="add_pelicula_to_library",
from_action=item.action).tourl())))
if item.channel != "downloads" and downloadenabled != "false":
if item.channel != "downloads" and item.channel != "videolibrary" and downloadenabled != "false":
# Descargar pelicula
if item.contentType == "movie":
context_commands.append((config.get_localized_string(60354), "XBMC.RunPlugin(%s?%s)" %
@@ -612,6 +612,11 @@ def set_context_commands(item, parent_item):
(sys.argv[0], item.clone(channel="downloads", action="save_download",
from_channel=item.channel,
from_action=item.action).tourl())))
context_commands.append((config.get_localized_string(60357), "XBMC.RunPlugin(%s?%s)" %
(sys.argv[0], item.clone(channel="downloads", action="save_download",
from_channel=item.channel,
from_action=item.action,
download='season').tourl())))
# Descargar episodio
elif item.contentType == 'episode' and item.action in ["findvideos"]:
@@ -622,11 +627,12 @@ def set_context_commands(item, parent_item):
from_action=item.action).tourl())))
# Descargar temporada
elif item.contentType == "season":
context_commands.append((config.get_localized_string(60357), "XBMC.RunPlugin(%s?%s)" %
(sys.argv[0], item.clone(channel="downloads", action="save_download",
from_channel=item.channel,
from_action=item.action).tourl())))
# elif item.contentType == "season":
# context_commands.append((config.get_localized_string(60357), "XBMC.RunPlugin(%s?%s)" %
# (sys.argv[0], item.clone(channel="downloads", action="save_download",
# from_channel=item.channel,
# from_action=item.action,
# download='season').tourl())))
# Abrir configuración
if parent_item.channel not in ["setting", "news", "search"]:
@@ -652,6 +658,10 @@ def set_context_commands(item, parent_item):
action="open_menu",
parent=parent_item.tourl()).tourl(
))))
if config.dev_mode():
context_commands.insert(1, ("item info",
"XBMC.Container.Update (%s?%s)" % (sys.argv[0], Item(action="itemInfo",
parent=item.tojson()).tourl())))
return context_commands

View File

@@ -19,7 +19,7 @@ addon = xbmcaddon.Addon('plugin.video.kod')
_hdr_pat = re.compile("^@@ -(\d+),?(\d+)? \+(\d+),?(\d+)? @@.*")
branch = 'stable'
user = 'kodiondemand'
user = 'mac12m99'
repo = 'addon'
addonDir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + '/'
maxPage = 5 # le api restituiscono 30 commit per volta, quindi se si è rimasti troppo indietro c'è bisogno di andare avanti con le pagine
@@ -74,9 +74,6 @@ def check_addon_init():
for c in reversed(commits[:pos]):
commit = httptools.downloadpage(c['url']).data
commitJson = json.loads(commit)
# evitiamo di applicare i merge commit
if 'Merge' in commitJson['commit']['message']:
continue
logger.info('aggiornando a ' + commitJson['sha'])
alreadyApplied = True
@@ -131,7 +128,7 @@ def check_addon_init():
filetools.mkdir(addonDir + d)
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)
if not alreadyApplied and 'Merge' not in commitJson['commit']['message']: # non mando notifica se già applicata (es. scaricato zip da github) o se è un merge
changelog += commitJson['commit']['message'] + " | "
nCommitApplied += 1
if addon.getSetting("addon_update_message"):