diff --git a/CHANGES.md b/CHANGES.md index 7d00d1f..f1d4127 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,7 @@ -### 0.25.12 (2021-10-17 20:30:00 UTC) +### 0.25.12 (2021-10-17 23:00:00 UTC) * Fix large sickbeard db's that occured from using subtitle settings +* Update zoneinfo fallback to 2021d ### 0.25.11 (2021-10-12 17:00:00 UTC) diff --git a/lib/dateutil/zoneinfo/dateutil-zoneinfo.tar.gz b/lib/dateutil/zoneinfo/dateutil-zoneinfo.tar.gz index 1dfc526..9c9d7c6 100644 Binary files a/lib/dateutil/zoneinfo/dateutil-zoneinfo.tar.gz and b/lib/dateutil/zoneinfo/dateutil-zoneinfo.tar.gz differ diff --git a/sickbeard/databases/mainDB.py b/sickbeard/databases/mainDB.py index 15e6f1a..927c51f 100644 --- a/sickbeard/databases/mainDB.py +++ b/sickbeard/databases/mainDB.py @@ -56,7 +56,17 @@ class MainSanityCheck(db.DBSanityCheck): ' FROM tv_episodes' ' WHERE subtitles LIKE "%,%"') - for cur_ep in ep_result: + ep_len, cur_p = len(ep_result), 0 + ep_step = ep_len / 100.0 + fix_msg = 'Fixing subtitles: %s' + + if ep_len: + self.connection.upgrade_log(fix_msg % ('%s%%' % 0)) + + for _cur_count, cur_ep in enumerate(ep_result): + if cur_p < int(_cur_count / ep_step): + cur_p = int(_cur_count / ep_step) + self.connection.upgrade_log(fix_msg % ('%s%%' % cur_p)) if not cleaned: logger.log('Removing duplicate subtitles data in TV Episodes table, this WILL take some time') cleaned = True @@ -76,7 +86,9 @@ class MainSanityCheck(db.DBSanityCheck): self.connection.mass_action(cl) logger.log(u'Performing a vacuum on the database.', logger.DEBUG) + self.connection.upgrade_log(fix_msg % 'VACUUM') self.connection.action('VACUUM') + self.connection.upgrade_log(fix_msg % 'finished') self.connection.set_flag('fix_episode_subtitles')