mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-26 02:36:10 +00:00
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)
|
||||
|
||||
# delete db
|
||||
os.remove(getKodiDBPath())
|
||||
deletecount = 0
|
||||
deleted = False
|
||||
while(deleted == False):
|
||||
try:
|
||||
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
|
||||
addon = xbmcaddon.Addon(id='plugin.video.emby')
|
||||
|
|
Loading…
Reference in a new issue