add a loop for deleting the database if it fails first time and back out
if it does not work
This commit is contained in:
parent
1b20863cf9
commit
c473305556
1 changed files with 13 additions and 2 deletions
|
@ -171,7 +171,18 @@ def reset():
|
||||||
xbmc.sleep(1000)
|
xbmc.sleep(1000)
|
||||||
|
|
||||||
# delete db
|
# delete db
|
||||||
|
deletecount = 0
|
||||||
|
deleted = False
|
||||||
|
while(deleted == False):
|
||||||
|
try:
|
||||||
os.remove(getKodiDBPath())
|
os.remove(getKodiDBPath())
|
||||||
|
deleted = True
|
||||||
|
except:
|
||||||
|
deletecount += 1
|
||||||
|
if(deletecount > 10):
|
||||||
|
dialog.ok('Warning', 'Could not delete Database, please try again later')
|
||||||
|
return
|
||||||
|
xbmc.sleep(1000)
|
||||||
|
|
||||||
# remove from addon data directory
|
# remove from addon data directory
|
||||||
addon = xbmcaddon.Addon(id='plugin.video.emby')
|
addon = xbmcaddon.Addon(id='plugin.video.emby')
|
||||||
|
|
Loading…
Reference in a new issue