Prevent patch loop

Try once, then let it go, to avoid locking user in a restart loop
This commit is contained in:
angelblue05 2018-10-07 18:18:37 -05:00
parent aef76725c8
commit 30f066ede8

View file

@ -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