From 9fcc4df3d68807ea52ba6c760c83577e4811f959 Mon Sep 17 00:00:00 2001 From: robweber Date: Sat, 17 Aug 2024 11:14:53 -0500 Subject: [PATCH] [script.xbmcbackup] 1.7.1 --- script.xbmcbackup/addon.xml | 12 +++++------- .../language/resource.language.en_gb/strings.po | 8 ++++++++ script.xbmcbackup/resources/lib/authorizers.py | 4 ++-- script.xbmcbackup/resources/lib/backup.py | 3 ++- script.xbmcbackup/resources/lib/utils.py | 2 ++ 5 files changed, 19 insertions(+), 10 deletions(-) diff --git a/script.xbmcbackup/addon.xml b/script.xbmcbackup/addon.xml index 8733feeac..72fb6bc99 100644 --- a/script.xbmcbackup/addon.xml +++ b/script.xbmcbackup/addon.xml @@ -1,6 +1,6 @@  + name="Backup" version="1.7.1" provider-name="robweber"> @@ -24,12 +24,10 @@ resources/images/screenshot3.jpg resources/images/screenshot4.jpg - 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 + Version 1.7.1 +trim spaces around Dropbox key/secret entry +fix error with zip file restores +added additional information when gathering files إنسخ إحتياطياً قاعده بيانات إكس بى إم سى وملفات اﻹعدادات فى حاله وقوع إنهيار مع إمكانيه اﻹسترجاع Добавката може да създава резервни копия и възстановява базата данни и настройките на Kodi, в случай на срив или повреда на файловете. diff --git a/script.xbmcbackup/resources/language/resource.language.en_gb/strings.po b/script.xbmcbackup/resources/language/resource.language.en_gb/strings.po index 39eee0a4c..9e1b2366d 100644 --- a/script.xbmcbackup/resources/language/resource.language.en_gb/strings.po +++ b/script.xbmcbackup/resources/language/resource.language.en_gb/strings.po @@ -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 "" diff --git a/script.xbmcbackup/resources/lib/authorizers.py b/script.xbmcbackup/resources/lib/authorizers.py index 8504e65ee..ce871031c 100644 --- a/script.xbmcbackup/resources/lib/authorizers.py +++ b/script.xbmcbackup/resources/lib/authorizers.py @@ -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 diff --git a/script.xbmcbackup/resources/lib/backup.py b/script.xbmcbackup/resources/lib/backup.py index 0be8b90fd..14cc54a09 100644 --- a/script.xbmcbackup/resources/lib/backup.py +++ b/script.xbmcbackup/resources/lib/backup.py @@ -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 @@ -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() diff --git a/script.xbmcbackup/resources/lib/utils.py b/script.xbmcbackup/resources/lib/utils.py index 246fa618f..0614d475b 100644 --- a/script.xbmcbackup/resources/lib/utils.py +++ b/script.xbmcbackup/resources/lib/utils.py @@ -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))