mirror of
https://github.com/robweber/xbmcbackup.git
synced 2024-12-22 22:15:23 +01:00
moved when progress bar first displays so you know the addon is doing something
This commit is contained in:
parent
59896ac0bf
commit
baedaf1b24
@ -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
|
||||
|
12
default.py
12
default.py
@ -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()):
|
||||
|
Loading…
Reference in New Issue
Block a user