first commit - kind of works

This commit is contained in:
robweber
2012-04-17 16:03:45 -05:00
commit c39b5d540a
7 changed files with 61 additions and 0 deletions

19
default.py Normal file
View 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()