Compare commits

...

9 Commits

Author SHA1 Message Date
Rob Weber 1dcc302ddd part of #247 2025-11-05 15:10:49 -06:00
robweber 1559df4d4c version 1.7.1 2024-08-17 11:03:32 -05:00
Rob Weber dd2ddb50be updated changelog 2024-06-13 18:07:23 -05:00
robweber 4f00c1d983 change version 2024-04-28 10:43:35 -05:00
robweber ca7f6e89c7 updated changelog 2024-04-28 10:40:00 -05:00
robweber 7e820c9ad7 part of #230 2024-04-28 10:35:24 -05:00
robweber 324f3a46cf fixes #235 2024-04-28 10:22:31 -05:00
robweber d1907baf38 updated changelog.md 2024-04-28 10:12:12 -05:00
rjclark99 a32e6f2656 Enhanced self.APP_KEY and self.APP_SECRET grabbing. (#233)
* added function getSettingStringStripped to utils and implemented in authorizers.py dropbox  flow line 47

* added function getSettingStringStripped to utils and implemented in authorizers.py dropbox  flow line 47
2024-04-28 10:09:59 -05:00
6 changed files with 45 additions and 12 deletions
+5 -7
View File
@@ -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" />
@@ -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>
+15
View File
@@ -4,6 +4,21 @@ 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.7.1](https://github.com/robweber/xbmcbackup/compare/matrix-1.7.0...robweber:matrix-1.7.1)
### Added
- `utils.getSettingStripped` to trim whitespace around setting strings
### Changed
- Dropbox Secret and App Key are trimmed on loading - thanks @rjclark99
- added additional dialog information when gathering files for a Restore. This doesn't fix the speed which these happen since that is related to the platform but does provide more info that it's working.
### Fixed
- issue where Zip file restores were failing due to a missing `is_dir` attribute
## [Version 1.7.0](https://github.com/robweber/xbmcbackup/compare/matrix-1.6.8...robweber:matrix-1.7.0)
### Added
@@ -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 ""
+13 -4
View File
@@ -2,9 +2,10 @@ import xbmcgui
import xbmcvfs
import json
import pyqrcode
import time
import resources.lib.tinyurl as tinyurl
import resources.lib.utils as utils
from datetime import datetime
import datetime
# don't die on import error yet, these might not even get used
try:
@@ -13,6 +14,14 @@ try:
except ImportError:
pass
# fix for datetime.strptime bug https://kodi.wiki/view/Python_Problems#datetime.strptime
class proxydt(datetime.datetime):
@classmethod
def strptime(cls, date_string, format):
return datetime.datetime(*(time.strptime(date_string, format)[:6]))
datetime.datetime = proxydt
class QRCode(xbmcgui.WindowXMLDialog):
def __init__(self, *args, **kwargs):
@@ -44,8 +53,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
@@ -145,7 +154,7 @@ class DropboxAuthorizer:
if(token.strip() != ""):
result = json.loads(token)
# convert expiration back to a datetime object
result['expiration'] = datetime.strptime(result['expiration'], "%Y-%m-%d %H:%M:%S.%f")
result['expiration'] = datetime.datetime.strptime(result['expiration'], "%Y-%m-%d %H:%M:%S.%f")
token_file.close()
+2 -1
View File
@@ -228,7 +228,7 @@ class XbmcBackup:
# 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 @@ class XbmcBackup:
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()
+2
View File
@@ -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))