From 9d6110fd372131e958589492c40ec8b29521756c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20V=C3=A9zina?= <5130500+morpheus65535@users.noreply.github.com> Date: Sat, 10 Oct 2020 10:26:56 -0400 Subject: [PATCH] Fix for #1144 --- bazarr/config.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/bazarr/config.py b/bazarr/config.py index 3adddc3a4..158415e5f 100644 --- a/bazarr/config.py +++ b/bazarr/config.py @@ -2,6 +2,8 @@ import hashlib import os +from subliminal.cache import region + from simpleconfigparser import simpleconfigparser from get_args import args @@ -234,6 +236,26 @@ def save_settings(settings_items): 'settings-radarr-only_monitored']: exclusion_updated = True + if key == 'settings-addic7ed-username': + if key != settings.addic7ed.username: + region.delete('addic7ed_data') + + if key == 'settings-legendasdivx-username': + if key != settings.legendasdivx.username: + region.delete('legendasdivx_cookies2') + + if key == 'settings-opensubtitles-username': + if key != settings.opensubtitles.username: + region.delete('os_token') + + if key == 'settings-subscene-username': + if key != settings.subscene.username: + region.delete('subscene_cookies2') + + if key == 'settings-titlovi-username': + if key != settings.titlovi.username: + region.delete('titlovi_token') + if settings_keys[0] == 'settings': settings[settings_keys[1]][settings_keys[2]] = str(value)