alter reset so that addon data dir is always removed when video db

delete fails
This commit is contained in:
im85288 2015-04-03 18:42:15 +01:00
parent 7cfbafe16b
commit 30de132920
2 changed files with 8 additions and 8 deletions

View file

@ -171,6 +171,12 @@ def reset():
return
xbmc.sleep(1000)
# remove from addon data directory
addon = xbmcaddon.Addon(id='plugin.video.emby')
addondir = xbmc.translatePath(addon.getAddonInfo('profile'))
dataPath = os.path.join(addondir + os.sep)
removeDirectory(dataPath)
# delete db
deletecount = 0
deleted = False
@ -189,15 +195,9 @@ def reset():
# extra check on the database to see it has been removed
if xbmcvfs.exists(getKodiDBPath()):
dialog = xbmcgui.Dialog()
dialog.ok('Error', 'The video database could not be deleted, this will need to be done manually. First remove: '+getKodiDBPath() + ' Then delete the plugin from your addon_data directory and restart Kodi')
dialog.ok('Error', 'The video database could not be deleted, this will need to be done manually. Remove: '+getKodiDBPath() + ' then restart Kodi')
return
# remove from addon data directory
addon = xbmcaddon.Addon(id='plugin.video.emby')
addondir = xbmc.translatePath(addon.getAddonInfo('profile'))
dataPath = os.path.join(addondir + os.sep)
removeDirectory(dataPath)
# remove old entries from sources.xml
dialog = xbmcgui.Dialog()