mirror of
https://github.com/robweber/xbmcbackup.git
synced 2024-11-15 04:45:49 +01:00
Merge branch 'master' into helix_google_drive
Conflicts: resources/language/English/strings.xml
This commit is contained in:
commit
f0cce73851
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
<addon id="script.xbmcbackup"
|
<addon id="script.xbmcbackup"
|
||||||
name="Backup" version="1.0.3" provider-name="robweber">
|
name="Backup" version="1.0.5" provider-name="robweber">
|
||||||
<requires>
|
<requires>
|
||||||
<import addon="xbmc.python" version="2.19.0"/>
|
<import addon="xbmc.python" version="2.19.0"/>
|
||||||
<import addon="script.module.httplib2" version="0.8.0" optional="true"/>
|
<import addon="script.module.httplib2" version="0.8.0" optional="true"/>
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
Version 1.0.5
|
||||||
|
|
||||||
|
make compression setting compatible with python 2.6 and above
|
||||||
|
|
||||||
|
Version 1.0.4
|
||||||
|
|
||||||
|
exit if we can't delete the old archive, non recoverable
|
||||||
|
|
||||||
Version 1.0.3
|
Version 1.0.3
|
||||||
|
|
||||||
added "delete auth" dialog to delete oauth files in settings
|
added "delete auth" dialog to delete oauth files in settings
|
||||||
|
@ -87,5 +87,6 @@
|
|||||||
<string id="30093">Delete Authorization Info</string>
|
<string id="30093">Delete Authorization Info</string>
|
||||||
<string id="30094">This will delete any OAuth token files</string>
|
<string id="30094">This will delete any OAuth token files</string>
|
||||||
<string id="30095">Do you want to do this?</string>
|
<string id="30095">Do you want to do this?</string>
|
||||||
<string id="30096">Google Drive</string>
|
<string id="30096">Old Zip Archive could not be deleted</string>
|
||||||
|
<string id="30097">This needs to happen before a backup can run</string>
|
||||||
</strings>
|
</strings>
|
||||||
|
@ -121,7 +121,10 @@ class XbmcBackup:
|
|||||||
if(utils.getSetting("compress_backups") == 'true'):
|
if(utils.getSetting("compress_backups") == 'true'):
|
||||||
#delete old temp file
|
#delete old temp file
|
||||||
if(self.xbmc_vfs.exists(xbmc.translatePath('special://temp/xbmc_backup_temp.zip'))):
|
if(self.xbmc_vfs.exists(xbmc.translatePath('special://temp/xbmc_backup_temp.zip'))):
|
||||||
self.xbmc_vfs.rmfile(xbmc.translatePath('special://temp/xbmc_backup_temp.zip'))
|
if(not self.xbmc_vfs.rmfile(xbmc.translatePath('special://temp/xbmc_backup_temp.zip'))):
|
||||||
|
#we had some kind of error deleting the old file
|
||||||
|
xbmcgui.Dialog().ok(utils.getString(30010),utils.getString(30096),utils.getString(30097))
|
||||||
|
return
|
||||||
|
|
||||||
#save the remote file system and use the zip vfs
|
#save the remote file system and use the zip vfs
|
||||||
self.saved_remote_vfs = self.remote_vfs
|
self.saved_remote_vfs = self.remote_vfs
|
||||||
|
@ -81,7 +81,7 @@ class ZipFileSystem(Vfs):
|
|||||||
|
|
||||||
def __init__(self,rootString,mode):
|
def __init__(self,rootString,mode):
|
||||||
self.root_path = ""
|
self.root_path = ""
|
||||||
self.zip = zipfile.ZipFile(rootString,mode=mode,allowZip64=True)
|
self.zip = zipfile.ZipFile(rootString,mode=mode,compression=zipfile.ZIP_DEFLATED,allowZip64=True)
|
||||||
|
|
||||||
def listdir(self,directory):
|
def listdir(self,directory):
|
||||||
return [[],[]]
|
return [[],[]]
|
||||||
@ -94,7 +94,7 @@ class ZipFileSystem(Vfs):
|
|||||||
|
|
||||||
aFile = xbmcvfs.File(xbmc.translatePath(source),'r')
|
aFile = xbmcvfs.File(xbmc.translatePath(source),'r')
|
||||||
|
|
||||||
self.zip.writestr(utils.encode(dest),aFile.read(),compress_type=zipfile.ZIP_DEFLATED)
|
self.zip.writestr(utils.encode(dest),aFile.read())
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user