mirror of
https://github.com/robweber/xbmcbackup.git
synced 2025-06-23 19:14:33 +02:00
added call to XbmcBackup.run() in service.py file
added showNotification() method so that a notification can display when backup starts via scheduler
This commit is contained in:
@ -106,9 +106,9 @@ class XbmcBackup:
|
||||
|
||||
utils.log(utils.getString(30046))
|
||||
|
||||
def run(self,mode=-1):
|
||||
def run(self,mode=-1,runSilent=False):
|
||||
#check if we should use the progress bar
|
||||
if(utils.getSetting('run_silent') == 'false'):
|
||||
if(utils.getSetting('run_silent') == 'false' and not runSilent):
|
||||
self.progressBar = xbmcgui.DialogProgress()
|
||||
self.progressBar.create(utils.getString(30010),utils.getString(30049) + "......")
|
||||
|
||||
@ -147,6 +147,9 @@ class XbmcBackup:
|
||||
self.restoreFiles()
|
||||
else:
|
||||
xbmcgui.Dialog().ok(utils.getString(30010),utils.getString(30045),self.remote_path)
|
||||
|
||||
if(utils.getSetting('run_silent') == 'false' and not runSilent):
|
||||
self.progressBar.close()
|
||||
|
||||
def syncFiles(self):
|
||||
|
||||
@ -188,9 +191,6 @@ class XbmcBackup:
|
||||
else:
|
||||
vfs.copy(xbmc.makeLegalFilename(source + aFile),xbmc.makeLegalFilename(dest + aFile,False))
|
||||
|
||||
if(utils.getSetting('run_silent') == 'false'):
|
||||
self.progressBar.close()
|
||||
|
||||
def updateProgress(self,message=''):
|
||||
self.filesLeft = self.filesLeft - 1
|
||||
|
||||
|
Reference in New Issue
Block a user