mirror of
https://github.com/robweber/xbmcbackup.git
synced 2024-11-15 04:45:49 +01:00
part of #174, fixes ok() method def change
This commit is contained in:
parent
71c8d9ae54
commit
a0ccd85d9e
@ -13,9 +13,9 @@ def authorize_cloud(cloudProvider):
|
|||||||
authorizer = DropboxAuthorizer()
|
authorizer = DropboxAuthorizer()
|
||||||
|
|
||||||
if(authorizer.authorize()):
|
if(authorizer.authorize()):
|
||||||
xbmcgui.Dialog().ok(utils.getString(30010), utils.getString(30027) + ' ' + utils.getString(30106))
|
xbmcgui.Dialog().ok(utils.getString(30010), '%s %s' %(utils.getString(30027), utils.getString(30106)))
|
||||||
else:
|
else:
|
||||||
xbmcgui.Dialog().ok(utils.getString(30010), utils.getString(30107) + ' ' + utils.getString(30027))
|
xbmcgui.Dialog().ok(utils.getString(30010), '%s %s' % (utils.getString(30107), utils.getString(30027)))
|
||||||
|
|
||||||
|
|
||||||
def remove_auth():
|
def remove_auth():
|
||||||
|
@ -23,7 +23,7 @@ class DropboxAuthorizer:
|
|||||||
|
|
||||||
if(self.APP_KEY == '' and self.APP_SECRET == ''):
|
if(self.APP_KEY == '' and self.APP_SECRET == ''):
|
||||||
# we can't go any farther, need these for sure
|
# we can't go any farther, need these for sure
|
||||||
xbmcgui.Dialog().ok(utils.getString(30010), utils.getString(30027) + ' ' + utils.getString(30058), utils.getString(30059))
|
xbmcgui.Dialog().ok(utils.getString(30010), '%s %s\n%s' % (utils.getString(30027), utils.getString(30058), utils.getString(30059)))
|
||||||
|
|
||||||
result = False
|
result = False
|
||||||
|
|
||||||
@ -51,7 +51,7 @@ class DropboxAuthorizer:
|
|||||||
|
|
||||||
# print url in log
|
# print url in log
|
||||||
utils.log("Authorize URL: " + url)
|
utils.log("Authorize URL: " + url)
|
||||||
xbmcgui.Dialog().ok(utils.getString(30010), utils.getString(30056), utils.getString(30057), tinyurl.shorten(url))
|
xbmcgui.Dialog().ok(utils.getString(30010), '%s\n%s\n%s' % (utils.getString(30056), utils.getString(30057), tinyurl.shorten(url)))
|
||||||
|
|
||||||
# get the auth code
|
# get the auth code
|
||||||
code = xbmcgui.Dialog().input(utils.getString(30027) + ' ' + utils.getString(30103))
|
code = xbmcgui.Dialog().input(utils.getString(30027) + ' ' + utils.getString(30103))
|
||||||
|
@ -197,7 +197,7 @@ class XbmcBackup:
|
|||||||
|
|
||||||
if(not fileCopied):
|
if(not fileCopied):
|
||||||
# zip archive copy filed, inform the user
|
# zip archive copy filed, inform the user
|
||||||
shouldContinue = xbmcgui.Dialog().ok(utils.getString(30089), utils.getString(30090), utils.getString(30091))
|
shouldContinue = xbmcgui.Dialog().ok(utils.getString(30089), '%s\n%s' % (utils.getString(30090), utils.getString(30091)))
|
||||||
|
|
||||||
# delete the temp zip file
|
# delete the temp zip file
|
||||||
self.xbmc_vfs.rmfile(xbmcvfs.translatePath("special://temp/" + zip_name))
|
self.xbmc_vfs.rmfile(xbmcvfs.translatePath("special://temp/" + zip_name))
|
||||||
@ -255,7 +255,7 @@ class XbmcBackup:
|
|||||||
|
|
||||||
# for restores remote path must exist
|
# for restores remote path must exist
|
||||||
if(not self.remote_vfs.exists(self.remote_vfs.root_path)):
|
if(not self.remote_vfs.exists(self.remote_vfs.root_path)):
|
||||||
xbmcgui.Dialog().ok(utils.getString(30010), utils.getString(30045), self.remote_vfs.root_path)
|
xbmcgui.Dialog().ok(utils.getString(30010), '%s\n%s' % (utils.getString(30045), self.remote_vfs.root_path))
|
||||||
return
|
return
|
||||||
|
|
||||||
valFile = self._checkValidationFile(self.remote_vfs.root_path)
|
valFile = self._checkValidationFile(self.remote_vfs.root_path)
|
||||||
@ -316,7 +316,7 @@ class XbmcBackup:
|
|||||||
allFiles.append({"source": self.remote_vfs.root_path + aDir['name'], "dest": self.xbmc_vfs.root_path, "files": fileManager.getFiles()})
|
allFiles.append({"source": self.remote_vfs.root_path + aDir['name'], "dest": self.xbmc_vfs.root_path, "files": fileManager.getFiles()})
|
||||||
else:
|
else:
|
||||||
utils.log("error path not found: " + self.remote_vfs.root_path + aDir['name'])
|
utils.log("error path not found: " + self.remote_vfs.root_path + aDir['name'])
|
||||||
xbmcgui.Dialog().ok(utils.getString(30010), utils.getString(30045), self.remote_vfs.root_path + aDir['name'])
|
xbmcgui.Dialog().ok(utils.getString(30010), '%s\n%s' % (utils.getString(30045), self.remote_vfs.root_path + aDir['name']))
|
||||||
|
|
||||||
# restore all the files
|
# restore all the files
|
||||||
self.transferLeft = self.transferSize
|
self.transferLeft = self.transferSize
|
||||||
@ -354,7 +354,7 @@ class XbmcBackup:
|
|||||||
if(self.xbmc_vfs.exists(xbmcvfs.translatePath('special://temp/xbmc_backup_temp.zip'))):
|
if(self.xbmc_vfs.exists(xbmcvfs.translatePath('special://temp/xbmc_backup_temp.zip'))):
|
||||||
if(not self.xbmc_vfs.rmfile(xbmcvfs.translatePath('special://temp/xbmc_backup_temp.zip'))):
|
if(not self.xbmc_vfs.rmfile(xbmcvfs.translatePath('special://temp/xbmc_backup_temp.zip'))):
|
||||||
# we had some kind of error deleting the old file
|
# we had some kind of error deleting the old file
|
||||||
xbmcgui.Dialog().ok(utils.getString(30010), utils.getString(30096), utils.getString(30097))
|
xbmcgui.Dialog().ok(utils.getString(30010), '%s\n%s' % (utils.getString(30096), utils.getString(30097)))
|
||||||
return False
|
return False
|
||||||
|
|
||||||
# save the remote file system and use the zip vfs
|
# save the remote file system and use the zip vfs
|
||||||
|
Loading…
Reference in New Issue
Block a user