Revert "ennesimo fix updater (merge commits)"
This reverts commit 7e48899b
This commit is contained in:
@@ -11,7 +11,6 @@ import json
|
||||
import xbmc
|
||||
import re
|
||||
import xbmcaddon
|
||||
from lib import githash
|
||||
|
||||
addon = xbmcaddon.Addon('plugin.video.kod')
|
||||
|
||||
@@ -73,6 +72,9 @@ 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
|
||||
|
||||
@@ -138,7 +140,7 @@ def check_addon_init():
|
||||
filetools.mkdir(addonDir + d)
|
||||
filetools.move(addonDir + file['previous_filename'], addonDir + file['filename'])
|
||||
alreadyApplied = False
|
||||
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
|
||||
if not alreadyApplied: # non mando notifica se già applicata (es. scaricato zip da github)
|
||||
changelog += commitJson['commit']['message'] + " | "
|
||||
nCommitApplied += 1
|
||||
if addon.getSetting("addon_update_message"):
|
||||
@@ -157,6 +159,7 @@ def check_addon_init():
|
||||
|
||||
|
||||
def calcCurrHash():
|
||||
from lib import githash
|
||||
treeHash = githash.tree_hash(addonDir).hexdigest()
|
||||
logger.info('tree hash: ' + treeHash)
|
||||
commits = loadCommits()
|
||||
|
||||
Reference in New Issue
Block a user