From 88cf547a18d9dcc2411e64e958ca89011fcc46c4 Mon Sep 17 00:00:00 2001 From: marco Date: Sat, 5 Oct 2019 19:44:31 +0200 Subject: [PATCH] Revert "ennesimo fix updater (merge commits)" This reverts commit 7e48899b --- platformcode/updater.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/platformcode/updater.py b/platformcode/updater.py index 64c3fe26..a6e9c4a7 100644 --- a/platformcode/updater.py +++ b/platformcode/updater.py @@ -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()