diff --git a/CHANGES.md b/CHANGES.md index 382aa60d..71391f67 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -24,6 +24,12 @@ * Fix media process being ignored by Plex extras +### 3.30.16 (2024-03-24 20:30:00 UTC) + +* Fix external site links that used a deprecated config/general/advanced/"Anonymous redirect" +* Change enable legacy double quote support for SQLite when using Python 3.12+ + + ### 3.30.15 (2024-03-20 01:55:00 UTC) * Change allow Python 3.10.14, 3.9.19, and 3.8.19 diff --git a/sickgear/config.py b/sickgear/config.py index 7c352832..db12cb1f 100644 --- a/sickgear/config.py +++ b/sickgear/config.py @@ -544,6 +544,7 @@ class ConfigMigrator(object): 21: 'Rename vars misusing frequency', 22: 'Change Anonymous redirect', 23: 'Change Anonymous redirect', + 24: 'Change Anonymous redirect', } def migrate_config(self): @@ -587,8 +588,9 @@ class ConfigMigrator(object): """ Change deprecated anon redirect service URLs """ - if re.search(r'https?://(?:nullrefer.com|dereferer.org|derefer.me)', sickgear.ANON_REDIRECT): - sickgear.ANON_REDIRECT = r'https://nosplash.open-dereferrer.com/?' + sickgear.ANON_REDIRECT = re.sub( + r'https?://(?:nosplash.open-dereferrer.com|nullrefer.com|dereferer.org|derefer.me)', + r'https://nullrefer.ir', sickgear.ANON_REDIRECT) # Migration v1: Custom naming def _migrate_v1(self): @@ -983,3 +985,6 @@ class ConfigMigrator(object): def _migrate_v23(self): self.deprecate_anon_service() + + def _migrate_v24(self): + self.deprecate_anon_service() diff --git a/sickgear/db.py b/sickgear/db.py index cde45047..755932e9 100644 --- a/sickgear/db.py +++ b/sickgear/db.py @@ -44,6 +44,8 @@ db_support_multiple_insert = (3, 7, 11) <= sqlite3.sqlite_version_info # type: db_support_column_rename = (3, 25, 0) <= sqlite3.sqlite_version_info # type: bool db_support_upsert = (3, 25, 0) <= sqlite3.sqlite_version_info # type: bool db_supports_backup = hasattr(sqlite3.Connection, 'backup') and (3, 6, 11) <= sqlite3.sqlite_version_info # type: bool +db_supports_setconfig_dqs = (hasattr(sqlite3.Connection, 'setconfig') and hasattr(sqlite3, 'SQLITE_DBCONFIG_DQS_DDL') + and hasattr(sqlite3, 'SQLITE_DBCONFIG_DQS_DML')) # type: bool def db_filename(filename='sickbeard.db', suffix=None): @@ -111,6 +113,10 @@ class DBConnection(object): self.filename = filename self.connection = sqlite3.connect(db_src, timeout=20) + # enable legacy double quote support + if db_supports_setconfig_dqs: + self.connection.setconfig(sqlite3.SQLITE_DBCONFIG_DQS_DDL, True) + self.connection.setconfig(sqlite3.SQLITE_DBCONFIG_DQS_DML, True) if 'dict' == row_type: self.connection.row_factory = self._dict_factory