From ec8ee500e491f2c613792918613db8d9208dd274 Mon Sep 17 00:00:00 2001 From: JackDandy Date: Sun, 24 Mar 2024 17:39:58 +0000 Subject: [PATCH] Fix external site links that used a deprecated config/general/advanced/"Anonymous redirect". --- CHANGES.md | 7 ++++++- sickgear/config.py | 9 +++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index b725e3e0..0ed75126 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,4 +1,9 @@ -### 3.30.15 (2024-03-20 01:55:00 UTC) +### 3.30.16 (2024-03-24 17:30:00 UTC) + +* Fix external site links that used a deprecated config/general/advanced/"Anonymous redirect" + + +### 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()