mirror of
https://github.com/robweber/xbmcbackup.git
synced 2024-11-15 04:45:49 +01:00
added more info to progress bar
This commit is contained in:
parent
4ff0e49d82
commit
f6cac868d7
@ -121,28 +121,28 @@ class XbmcBackup:
|
|||||||
self.remote_vfs.set_root('/')
|
self.remote_vfs.set_root('/')
|
||||||
|
|
||||||
def run(self,mode=-1,runSilent=False):
|
def run(self,mode=-1,runSilent=False):
|
||||||
#check if we should use the progress bar
|
|
||||||
if(utils.getSetting('run_silent') == 'false' and not runSilent):
|
|
||||||
self.progressBar = xbmcgui.DialogProgress()
|
|
||||||
self.progressBar.create(utils.getString(30010),utils.getString(30049) + "......")
|
|
||||||
|
|
||||||
#determine backup mode
|
|
||||||
if(mode == -1):
|
|
||||||
mode = int(utils.getSetting('addon_mode'))
|
|
||||||
|
|
||||||
#append backup folder name
|
#append backup folder name
|
||||||
remote_base_path = ""
|
remote_base_path = ""
|
||||||
|
progressBarTitle = utils.getString(30010) + " - "
|
||||||
if(mode == self.Backup and self.remote_vfs.root_path != ''):
|
if(mode == self.Backup and self.remote_vfs.root_path != ''):
|
||||||
#capture base path for backup rotation
|
#capture base path for backup rotation
|
||||||
remote_base_path = self.remote_vfs.set_root(self.remote_vfs.root_path + time.strftime("%Y%m%d") + "/")
|
remote_base_path = self.remote_vfs.set_root(self.remote_vfs.root_path + time.strftime("%Y%m%d") + "/")
|
||||||
|
progressBarTitle = progressBarTitle + utils.getString(30016)
|
||||||
elif(mode == self.Restore and utils.getSetting("backup_name") != '' and self.remote_vfs.root_path != ''):
|
elif(mode == self.Restore and utils.getSetting("backup_name") != '' and self.remote_vfs.root_path != ''):
|
||||||
self.remote_vfs.set_root(self.remote_vfs.root_path + utils.getSetting("backup_name") + "/")
|
self.remote_vfs.set_root(self.remote_vfs.root_path + utils.getSetting("backup_name") + "/")
|
||||||
|
progressBarTitle = progressBarTitle + utils.getString(30017)
|
||||||
else:
|
else:
|
||||||
self.remote_vfs = None
|
self.remote_vfs = None
|
||||||
|
|
||||||
utils.log(utils.getString(30047) + ": " + self.local_vfs.root_path)
|
utils.log(utils.getString(30047) + ": " + self.local_vfs.root_path)
|
||||||
utils.log(utils.getString(30048) + ": " + self.remote_vfs.root_path)
|
utils.log(utils.getString(30048) + ": " + self.remote_vfs.root_path)
|
||||||
|
|
||||||
|
#check if we should use the progress bar
|
||||||
|
if(utils.getSetting('run_silent') == 'false' and not runSilent):
|
||||||
|
self.progressBar = xbmcgui.DialogProgress()
|
||||||
|
self.progressBar.create(progressBarTitle,utils.getString(30049) + "......")
|
||||||
|
|
||||||
#run the correct mode
|
#run the correct mode
|
||||||
if(mode == self.Backup):
|
if(mode == self.Backup):
|
||||||
utils.log(utils.getString(30023) + " - " + utils.getString(30016))
|
utils.log(utils.getString(30023) + " - " + utils.getString(30016))
|
||||||
|
Loading…
Reference in New Issue
Block a user