2 Commits

Author SHA1 Message Date
Rob Weber
858bd6170a beta version 2019-11-26 13:45:15 -06:00
Rob Weber
1fb013f335 added custom zip file per #158 and #145 2019-11-26 13:43:55 -06:00
5 changed files with 1280 additions and 25 deletions

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="script.xbmcbackup"
name="Backup" version="1.5.3" provider-name="robweber">
name="Backup" version="1.5.3~beta1" provider-name="robweber">
<requires>
<!-- jarvis -->
<import addon="xbmc.python" version="2.25.0"/>
@@ -95,9 +95,7 @@
<screenshot>resources/images/screenshot3.png</screenshot>
<screenshot>resources/images/screenshot4.png</screenshot>
</assets>
<news>Version 1.5.3
- fixed issue with backup rotation when basepath not formatted correctly - thanks @AnonTester
Version 1.5.2
<news>Version 1.5.2
- Added script.module.dropbox import as a dependency for Dropbox filesystem
- Fixed issue getting xbmcbackup.val file from non-zipped remote directories. Was being copied as though it was a local file so it was failing.
- Use linux path separator (/) all the time, Kodi will interpret this correctly on windows. Was causing issues with remote file systems since os.path.sep

View File

@@ -4,15 +4,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
## [Version 1.5.3](https://github.com/robweber/xbmcbackup/compare/krypton-1.5.2...robweber:krypton-1.5.3) - 2019-12-30
## [Unreleased](https://github.com/robweber/xbmcbackup/compare/krypton-1.5.2...HEAD)
### Added
- added new badges for Kodi Version, TravisCI and license information from shields.io
### Changed
- backported a fix from Matrix that fixes backup rotation paths when slashes are missing from the base path (thanks @AnonTester)
- added new badges for Kodi Version, TravisCI and license information from shields.io
- added custom zipfile.py version to replace built in zip module
## [Version 1.5.2](https://github.com/robweber/xbmcbackup/compare/krypton-1.5.1...robweber:krypton-1.5.2) - 2019-09-30

View File

@@ -461,9 +461,9 @@ class XbmcBackup:
if(dirs[remove_num][0].split('.')[-1] == 'zip'):
#this is a file, remove it that way
self.remote_vfs.rmfile(self.remote_vfs.clean_path(self.remote_base_path) + dirs[remove_num][0])
self.remote_vfs.rmfile(self.remote_base_path + dirs[remove_num][0])
else:
self.remote_vfs.rmdir(self.remote_vfs.clean_path(self.remote_base_path) + dirs[remove_num][0] + "/")
self.remote_vfs.rmdir(self.remote_base_path + dirs[remove_num][0] + "/")
remove_num = remove_num + 1

View File

@@ -1,7 +1,7 @@
import xbmc
import xbmcvfs
import xbmcgui
import zipfile
from . import zipfile
import os.path
import sys
import dropbox
@@ -14,20 +14,17 @@ class Vfs:
def __init__(self,rootString):
self.set_root(rootString)
def clean_path(self, path):
# fix slashes
path = path.replace("\\", "/")
# check if trailing slash is included
if(path[-1:] != '/'):
path = path + '/'
return path
def set_root(self,rootString):
old_root = self.root_path
self.root_path = self.clean_path(rootString)
self.root_path = rootString
#fix slashes
self.root_path = self.root_path.replace("\\","/")
#check if trailing slash is included
if(self.root_path[-1:] != "/"):
self.root_path = self.root_path + "/"
#return the old root
return old_root

1263
resources/lib/zipfile.py Normal file

File diff suppressed because it is too large Load Diff