This commit is contained in:
Rob Weber 2015-02-13 09:28:55 -06:00
parent 65d10e22d9
commit 6de7ccaddf
3 changed files with 15 additions and 0 deletions

11
remove_auth.py Normal file
View File

@ -0,0 +1,11 @@
import xbmc
import xbmcgui
import xbmcvfs
import resources.lib.utils as utils
#triggered from settings.xml - asks if user wants to delete OAuth token information
shouldDelete = xbmcgui.Dialog().yesno(utils.getString(30093),utils.getString(30094),utils.getString(30095),autoclose=7000)
if(shouldDelete):
#delete any of the known token file types
xbmcvfs.delete(xbmc.translatePath(utils.data_dir() + "tokens.txt")) #dropbox

View File

@ -84,4 +84,7 @@
<string id="30090">The destination may not be writeable</string>
<string id="30091">Zip archive could not be copied</string>
<string id="30092">Not all files were copied</string>
<string id="30093">Delete Authorization Info</string>
<string id="30094">This will delete any OAuth token files</string>
<string id="30095">Do you want to do this?</string>
</strings>

View File

@ -6,6 +6,7 @@
<setting id="remote_path" type="folder" label="30020" visible="eq(-2,0)" />
<setting id="dropbox_key" type="text" label="30028" visible="eq(-3,2)" default="" />
<setting id="dropbox_secret" type="text" label="30029" visible="eq(-4,2)" default="" />
<setting id="remove_auth_button" type="action" label="30093" action="RunScript(special://home/addons/script.xbmcbackup/remove_auth.py)" visible="eq(-5,2)"/>
<setting id="compress_backups" type="bool" label="30087" default="false" />
<setting id="backup_rotation" type="number" label="30026" default="0" />
<setting id="progress_mode" type="enum" label="30022" lvalues="30082|30083|30084" default="0" />