mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2025-05-13 04:45:06 +00:00
alter reset so that addon data dir is always removed when video db
delete fails
This commit is contained in:
parent
7cfbafe16b
commit
30de132920
2 changed files with 8 additions and 8 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue