diff --git a/bazarr/config.py b/bazarr/config.py index 8854185dd..90da5b9d9 100644 --- a/bazarr/config.py +++ b/bazarr/config.py @@ -153,12 +153,14 @@ base_url = settings.general.base_url def save_settings(settings_items): from database import database for key, value in settings_items: + # Intercept database stored settings if key == 'enabled_languages': database.execute("UPDATE table_settings_languages SET enabled=0") for item in value: database.execute("UPDATE table_settings_languages SET enabled=1 WHERE code2=?", (item,)) continue + # Make sure that text based form values aren't pass as list if isinstance(value, list) and len(value) == 1: value = value[0] diff --git a/views/settingslanguages.html b/views/settingslanguages.html index 1be303144..f9a7946b7 100644 --- a/views/settingslanguages.html +++ b/views/settingslanguages.html @@ -71,7 +71,9 @@