From 30f066ede813faf76090426c7dbed6f98b0cb5bc Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Sun, 7 Oct 2018 18:18:37 -0500 Subject: [PATCH] Prevent patch loop Try once, then let it go, to avoid locking user in a restart loop --- resources/lib/downloader.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/resources/lib/downloader.py b/resources/lib/downloader.py index fc0bb875..607128bf 100644 --- a/resources/lib/downloader.py +++ b/resources/lib/downloader.py @@ -355,6 +355,11 @@ def get_objects(src, filename): restart = not xbmcvfs.exists(os.path.join(temp, "objects") + '/') path = os.path.join(temp, filename).encode('utf-8') + if restart and (settings('appliedPatch') or "") == filename: + + LOG.warn("Something went wrong applying this patch %s previously.", filename) + restart = False + if not xbmcvfs.exists(path): delete_folder() @@ -370,6 +375,8 @@ def get_objects(src, filename): dl.close() del response + settings('appliedPatch', filename) + unzip(path, temp, "objects") return restart