Skip to content

Commit 621122b

Browse files
committed
[script.xbmcbackup] 1.7.3
1 parent aaf6fba commit 621122b

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

script.xbmcbackup/addon.xml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
22
<addon id="script.xbmcbackup"
3-
name="Backup" version="1.7.2" provider-name="robweber">
3+
name="Backup" version="1.7.3" provider-name="robweber">
44
<requires>
55
<import addon="xbmc.python" version="3.0.0"/>
66
<import addon="script.module.dateutil" version="2.8.0" />
@@ -24,9 +24,8 @@
2424
<screenshot>resources/images/screenshot3.jpg</screenshot>
2525
<screenshot>resources/images/screenshot4.jpg</screenshot>
2626
</assets>
27-
<news>Version 1.7.2
28-
Fix bug with gui settings restore
29-
strptime Python bugfix
27+
<news>Version 1.7.3
28+
additional strptime modifications to fix scheduler behavior
3029
</news>
3130
<summary lang="ar_SA">إنسخ إحتياطياً قاعده بيانات إكس بى إم سى وملفات اﻹعدادات فى حاله وقوع إنهيار مع إمكانيه اﻹسترجاع</summary>
3231
<summary lang="bg_BG">Добавката може да създава резервни копия и възстановява базата данни и настройките на Kodi, в случай на срив или повреда на файловете.</summary>

script.xbmcbackup/resources/lib/authorizers.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,9 @@
1515
pass
1616

1717
# fix for datetime.strptime bug https://kodi.wiki/view/Python_Problems#datetime.strptime
18-
class proxydt(datetime.datetime):
18+
def patch_strptime(date_string, format):
19+
return datetime.datetime(*(time.strptime(date_string, format)[:6]))
1920

20-
@classmethod
21-
def strptime(cls, date_string, format):
22-
return datetime.datetime(*(time.strptime(date_string, format)[:6]))
23-
24-
datetime.datetime = proxydt
2521

2622
class QRCode(xbmcgui.WindowXMLDialog):
2723
def __init__(self, *args, **kwargs):
@@ -154,7 +150,7 @@ def _getToken(self):
154150
if(token.strip() != ""):
155151
result = json.loads(token)
156152
# convert expiration back to a datetime object
157-
result['expiration'] = datetime.datetime.strptime(result['expiration'], "%Y-%m-%d %H:%M:%S.%f")
153+
result['expiration'] = patch_strptime(result['expiration'], "%Y-%m-%d %H:%M:%S.%f")
158154

159155
token_file.close()
160156

0 commit comments

Comments
 (0)