From 35c17176998308d3a13a15e9e418894e6a910e36 Mon Sep 17 00:00:00 2001 From: "robweberjr@gmail.com" Date: Mon, 31 Mar 2014 12:05:44 -0500 Subject: [PATCH] Version bump and README.txt --- README.txt | 31 +++++++++++++++++++++++++++++-- addon.xml | 2 +- changelog.txt | 4 ++++ 3 files changed, 34 insertions(+), 3 deletions(-) diff --git a/README.txt b/README.txt index ad5ec8b..9d57199 100644 --- a/README.txt +++ b/README.txt @@ -37,11 +37,38 @@ Once you have your app key and secret add them to the settings. XBMC Backup now Scripting XBMC Backup: -If you wish to script this addon using an outside scheduler or script it can be given parameters via the Xbmc.RunScript() or JsonRPC.Addons.ExecuteAddon() methods. Parameters given are either "backup" or "restore" to launch the correct program mode. An example would be: +If you wish to script this addon using an outside scheduler or script it can be given parameters via the Xbmc.RunScript() or JsonRPC.Addons.ExecuteAddon() methods. Parameters given are either "backup" or "restore" to launch the correct program mode. If mode is "restore", an additional "archive" parameter can be given to set the restore point to be used instead of prompting via the GUI. An example would be: -RunScript(script.xbmcbackup,backup) +Python code: +------------------------------------------- +RunScript(script.xbmcbackup,mode=backup) +------------------------------------------- +or +JSON Request: +------------------------------------------- +{ "jsonrpc": "2.0", "method": "Addons.ExecuteAddon","params":{"addonid":"script.xbmcbackup","params":{"mode":"restore","archive":"000000000000"}}, "id": 1 } +------------------------------------------- + +There is also a windows parameter that can be used to check if XBMC Backup is running within a skin or from another program. It is attached to the home window, an example of using it would be the following: + +Python code: +------------------------------------------- +#kick off the xbmc backup +xbmc.executeJSONRPC('{ "jsonrpc": "2.0", "method": "Addons.ExecuteAddon","params":{"addonid":"script.xbmcbackup","params":{"mode":"backup"}}, "id": 1 }') + +#sleep for a few seconds to give it time to kick off +xbmc.sleep(10000) + +window = xbmcgui.Window(10000) + +while (window.getProperty('script.xbmcbackup.running') == 'true'): + #do something here, probably just sleep for a few seconds + xbmc.sleep(5000) + +#backup is now done, continue with script +------------------------------------------- FAQ: I can't see any restore points when choosing "Restore", what is the problem? diff --git a/addon.xml b/addon.xml index 99650cf..9a80d74 100644 --- a/addon.xml +++ b/addon.xml @@ -1,6 +1,6 @@  + name="XBMC Backup" version="0.5.2" provider-name="robweber"> diff --git a/changelog.txt b/changelog.txt index b18e08b..0df5a9e 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,7 @@ +Version 0.5.2 + +added additional script and window parameters, thanks Samu-rai + Version 0.5.1 updated for new Gotham xbmc python updates