Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[script.xbmcbackup] 1.7.1 #2640

Merged
merged 1 commit into from
Aug 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions script.xbmcbackup/addon.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="script.xbmcbackup"
name="Backup" version="1.7.0" provider-name="robweber">
name="Backup" version="1.7.1" provider-name="robweber">
<requires>
<import addon="xbmc.python" version="3.0.0"/>
<import addon="script.module.dateutil" version="2.8.0" />
Expand All @@ -24,12 +24,10 @@
<screenshot>resources/images/screenshot3.jpg</screenshot>
<screenshot>resources/images/screenshot4.jpg</screenshot>
</assets>
<news>Version 1.7.0
Can add suffix to backup folder names
translations sync
Minor UI fixes
Fixed Dropbox tokens expiring by using refresh tokens
Always recommend restart after a restore
<news>Version 1.7.1
trim spaces around Dropbox key/secret entry
fix error with zip file restores
added additional information when gathering files
</news>
<summary lang="ar_SA">إنسخ إحتياطياً قاعده بيانات إكس بى إم سى وملفات اﻹعدادات فى حاله وقوع إنهيار مع إمكانيه اﻹسترجاع</summary>
<summary lang="bg_BG">Добавката може да създава резервни копия и възстановява базата данни и настройките на Kodi, в случай на срив или повреда на файловете.</summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -629,3 +629,11 @@ msgstr ""
msgctxt "#30161"
msgid "Amend a string to the end of each backup folder or ZIP file"
msgstr ""

msgctxt "#30162"
msgid "this could take some time"
msgstr ""

msgctxt "#30163"
msgid "Current folder"
msgstr ""
4 changes: 2 additions & 2 deletions script.xbmcbackup/resources/lib/authorizers.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ class DropboxAuthorizer:
APP_SECRET = ""

def __init__(self):
self.APP_KEY = utils.getSetting('dropbox_key')
self.APP_SECRET = utils.getSetting('dropbox_secret')
self.APP_KEY = utils.getSettingStringStripped('dropbox_key')
self.APP_SECRET = utils.getSettingStringStripped('dropbox_secret')

def setup(self):
result = True
Expand Down
3 changes: 2 additions & 1 deletion script.xbmcbackup/resources/lib/backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ def restore(self, progressOverride=False, selectedSets=None):
# copy just this file from the remote vfs
self.transferSize = self.remote_vfs.fileSize(self.remote_base_path + self.restore_point)
zipFile = []
zipFile.append({'file': self.remote_base_path + self.restore_point, 'size': self.transferSize})
zipFile.append({'file': self.remote_base_path + self.restore_point, 'size': self.transferSize, 'is_dir': False})

# set transfer size
self.transferLeft = self.transferSize
Expand Down Expand Up @@ -316,6 +316,7 @@ def restore(self, progressOverride=False, selectedSets=None):
self.xbmc_vfs.set_root(xbmcvfs.translatePath(aDir['path']))
if(self.remote_vfs.exists(self.remote_vfs.root_path + aDir['name'] + '/')):
# walk the directory
self.progressBar.updateProgress(0, f"{utils.getString(30049)}....{utils.getString(30162)}\n{utils.getString(30163)}: {aDir['name']}")
fileManager.walkTree(self.remote_vfs.root_path + aDir['name'] + '/')
self.transferSize = self.transferSize + fileManager.fileSize()

Expand Down
2 changes: 2 additions & 0 deletions script.xbmcbackup/resources/lib/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ def showNotification(message):
def getSetting(name):
return __Addon.getSetting(name)

def getSettingStringStripped(name):
return __Addon.getSettingString(name).strip()

def getSettingBool(name):
return bool(__Addon.getSettingBool(name))
Expand Down
Loading