From 6ef7795ac5af3a8bb12b4e4606b5cdbc84071f0b Mon Sep 17 00:00:00 2001 From: LASER-Yi Date: Sun, 28 Mar 2021 10:05:48 +0800 Subject: [PATCH] Fix a crash in ui when only one post-processing option is selected --- bazarr/config.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/bazarr/config.py b/bazarr/config.py index 71959a638..c7459eece 100644 --- a/bazarr/config.py +++ b/bazarr/config.py @@ -219,15 +219,12 @@ def get_settings(): value = [] else: continue + elif key in array_keys: + value = get_array_from(value) elif value == 'True': value = True elif value == 'False': value = False - elif (value[0] == '[' and value[-1] == ']'): - value = ast.literal_eval(value) - elif value.find(',') != -1: - value = value.split(',') - pass else: if key not in str_keys: try: @@ -458,8 +455,10 @@ def get_array_from(property): if property: if '[' in property: return ast.literal_eval(property) - else: + elif ',' in property: return property.split(',') + else: + return [property] else: return []