mirror of
https://github.com/robweber/xbmcbackup.git
synced 2024-12-22 14:05:23 +01:00
first commit - kind of works
This commit is contained in:
commit
c39b5d540a
21
LICENSE.txt
Normal file
21
LICENSE.txt
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
The MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2010 Rob Weber
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
0
README.txt
Normal file
0
README.txt
Normal file
15
addon.xml
Normal file
15
addon.xml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
|
<addon id="script.xbmcbackup"
|
||||||
|
name="XBMC Profile Backup" version="0.0.1" provider-name="robweber">
|
||||||
|
<requires>
|
||||||
|
<import addon="xbmc.python" version="2.0"/>
|
||||||
|
</requires>
|
||||||
|
<extension point="xbmc.python.script" library="default.py">
|
||||||
|
<provides>executable</provides>
|
||||||
|
</extension>
|
||||||
|
<extension point="xbmc.addon.metadata">
|
||||||
|
<summary lang="en"></summary>
|
||||||
|
<description lang="en"></description>
|
||||||
|
<platform>all</platform>
|
||||||
|
</extension>
|
||||||
|
</addon>
|
0
changelog.txt
Normal file
0
changelog.txt
Normal file
19
default.py
Normal file
19
default.py
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
import xbmc
|
||||||
|
import xbmcaddon
|
||||||
|
import xbmcvfs
|
||||||
|
import shutil
|
||||||
|
|
||||||
|
#get the addon class
|
||||||
|
__addon_id__ = 'script.xbmcbackup'
|
||||||
|
Addon = xbmcaddon.Addon(__addon_id__)
|
||||||
|
|
||||||
|
def syncFiles():
|
||||||
|
xbmc.log(xbmc.translatePath("special://profile"))
|
||||||
|
xbmc.log(Addon.getSetting("remote_path"))
|
||||||
|
|
||||||
|
if(xbmcvfs.exists(Addon.getSetting("remote_path") + "profile")):
|
||||||
|
shutil.rmtree(Addon.getSetting("remote_path") + "profile")
|
||||||
|
|
||||||
|
shutil.copytree(xbmc.translatePath("special://profile"),Addon.getSetting("remote_path") + "profile")
|
||||||
|
|
||||||
|
syncFiles()
|
6
resources/settings.xml
Normal file
6
resources/settings.xml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
|
<settings>
|
||||||
|
<category id="general" label="30000">
|
||||||
|
<setting id="remote_path" type="folder" label="Remote Path" />
|
||||||
|
</category>
|
||||||
|
</settings>
|
Loading…
Reference in New Issue
Block a user