mirror of
https://github.com/morpheus65535/bazarr
synced 2025-01-27 01:08:43 +00:00
Fix a crash in ui when only one post-processing option is selected
This commit is contained in:
parent
a57e7fbb7d
commit
6ef7795ac5
1 changed files with 5 additions and 6 deletions
|
@ -219,15 +219,12 @@ def get_settings():
|
||||||
value = []
|
value = []
|
||||||
else:
|
else:
|
||||||
continue
|
continue
|
||||||
|
elif key in array_keys:
|
||||||
|
value = get_array_from(value)
|
||||||
elif value == 'True':
|
elif value == 'True':
|
||||||
value = True
|
value = True
|
||||||
elif value == 'False':
|
elif value == 'False':
|
||||||
value = False
|
value = False
|
||||||
elif (value[0] == '[' and value[-1] == ']'):
|
|
||||||
value = ast.literal_eval(value)
|
|
||||||
elif value.find(',') != -1:
|
|
||||||
value = value.split(',')
|
|
||||||
pass
|
|
||||||
else:
|
else:
|
||||||
if key not in str_keys:
|
if key not in str_keys:
|
||||||
try:
|
try:
|
||||||
|
@ -458,8 +455,10 @@ def get_array_from(property):
|
||||||
if property:
|
if property:
|
||||||
if '[' in property:
|
if '[' in property:
|
||||||
return ast.literal_eval(property)
|
return ast.literal_eval(property)
|
||||||
else:
|
elif ',' in property:
|
||||||
return property.split(',')
|
return property.split(',')
|
||||||
|
else:
|
||||||
|
return [property]
|
||||||
else:
|
else:
|
||||||
return []
|
return []
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue