moved when progress bar first displays so you know the addon is doing something

This commit is contained in:
Rob Weber 2012-04-24 21:01:12 -05:00
parent 59896ac0bf
commit baedaf1b24
2 changed files with 11 additions and 6 deletions

View File

@ -9,3 +9,8 @@ Added progress bar and "silent" option for running on startup or as a script
[b]Version 0.0.4[/b]
Finished code for restore mode.
[b]Version 0.0.5[/b]
Added option to manually type a path rather than browse for one (only one used)
Show progress bar right away so you know this is doing something

View File

@ -87,7 +87,7 @@ class XbmcBackup:
#for the progress bar
progressBar = None
filesLeft = 0
filesTotal = 0
filesTotal = 1
fileManager = None
@ -112,6 +112,11 @@ class XbmcBackup:
self.log('Remote Dir: ' + self.remote_path)
def run(self):
#check if we should use the progress bar
if(self.Addon.getSetting('run_silent') == 'false'):
self.progressBar = xbmcgui.DialogProgress()
self.progressBar.create('XBMC Backup','Gathering file list.....')
#check what mode were are in
if(int(self.Addon.getSetting('addon_mode')) == 0):
self.syncFiles()
@ -149,11 +154,6 @@ class XbmcBackup:
self.filesTotal = len(fileList)
self.filesLeft = self.filesTotal
#check if we should use the progress bar
if(self.Addon.getSetting('run_silent') == 'false'):
self.progressBar = xbmcgui.DialogProgress()
self.progressBar.create('XBMC Backup','Running......')
#write each file from source to destination
for aFile in fileList:
if(not self.checkCancel()):