diff --git a/CHANGES.md b/CHANGES.md index 336b209..7ebad94 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,4 +1,11 @@ -### 0.21.37 (2020-05-30 12:00:00 UTC) +### 0.21.38 (2020-07-08 23:15:00 UTC) + +* Change add handling for when a dev db is based on an older production db +* Update UnRar for Windows 5.90 to 5.91 x64 +* Fix saving Trakt notification under py3 + + +### 0.21.37 (2020-05-30 12:00:00 UTC) * Fix Anime cards images * Fix ETTV torrent provider diff --git a/lib/rarfile/UnRAR.exe b/lib/rarfile/UnRAR.exe index b1fbc6a..6529bc2 100644 Binary files a/lib/rarfile/UnRAR.exe and b/lib/rarfile/UnRAR.exe differ diff --git a/sickbeard/trakt_helpers.py b/sickbeard/trakt_helpers.py index cf9ae61..e98a7b1 100644 --- a/sickbeard/trakt_helpers.py +++ b/sickbeard/trakt_helpers.py @@ -5,7 +5,7 @@ import re import sickbeard from .helpers import try_int -from _23 import decode_str, list_items +from _23 import decode_bytes, decode_str, list_items from six import iteritems, text_type @@ -37,7 +37,7 @@ def build_config(**kwargs): continue for cur_dir in root_dirs: account_id = try_int(account_id, None) - if account_id and decode_str(base64.urlsafe_b64encode(cur_dir)) == location: + if account_id and decode_str(base64.urlsafe_b64encode(decode_bytes(cur_dir))) == location: if isinstance(config.get(account_id), list): config[account_id] += [cur_dir] else: diff --git a/sickgear.py b/sickgear.py index 5079445..7bfee37 100755 --- a/sickgear.py +++ b/sickgear.py @@ -91,7 +91,7 @@ from sickbeard.event_queue import Events from sickbeard.tv import TVShow from sickbeard.webserveInit import WebServer -from six import moves, PY2 +from six import integer_types, moves, PY2 throwaway = datetime.datetime.strptime('20110101', '%Y%m%d') rollback_loaded = None @@ -456,6 +456,21 @@ class SickGear(object): print(u'Rollback to production of [%s] successful.' % d) sickbeard.classes.loading_msg.set_msg_progress(load_msg, 'Finished') + # handling of production version higher then current base of test db + if isinstance(base_v, integer_types) and max_v >= 100000 > cur_db_version > base_v: + sickbeard.classes.loading_msg.set_msg_progress(load_msg, 'Rollback') + print('Your [%s] database version (%s) is a db version and doesn\'t match SickGear required ' + 'version (%s), downgrading to production base db' % (d, cur_db_version, max_v)) + self.execute_rollback(mo, base_v, load_msg) + cur_db_version = db.DBConnection(d).checkDBVersion() + if 100000 <= cur_db_version: + print(u'Rollback to production base failed.') + sys.exit(u'If you have used other forks, your database may be unusable due to their changes') + if 100000 <= max_v and None is not base_v: + max_v = base_v # set max_v to the needed base production db for test_db + print(u'Rollback to production base of [%s] successful.' % d) + sickbeard.classes.loading_msg.set_msg_progress(load_msg, 'Finished') + # handling of production db versions if 0 < cur_db_version < 100000: if cur_db_version < min_v: @@ -547,7 +562,7 @@ class SickGear(object): # # Launch browser # if sickbeard.LAUNCH_BROWSER and not self.no_launch: # sickbeard.launch_browser(self.start_port) - + # main loop while True: time.sleep(1)