KoD 0.5
-riscritti molti canali per cambiamenti nella struttura stessa di kod
-altre robe carine
This commit is contained in:
mac12m99
2019-08-30 20:47:43 +02:00
parent aceb155d98
commit a3c90d90d7
204 changed files with 5196 additions and 4653 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

@@ -11,6 +11,7 @@ import json
import xbmc
import re
import xbmcaddon
from lib import githash
addon = xbmcaddon.Addon('plugin.video.kod')
@@ -72,9 +73,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
@@ -140,12 +138,12 @@ 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"):
time = nCommitApplied * 2000 if nCommitApplied < 10 else 20000
platformtools.dialog_notification('Kodi on Demand', changelog, time)
platformtools.dialog_notification('Kodi on Demand', 'Aggiornamenti applicati:\n' + changelog[:-3], time)
localCommitFile.seek(0)
localCommitFile.truncate()
@@ -159,7 +157,6 @@ def check_addon_init():
def calcCurrHash():
from lib import githash
treeHash = githash.tree_hash(addonDir).hexdigest()
logger.info('tree hash: ' + treeHash)
commits = loadCommits()