diff --git a/bazarr/api.py b/bazarr/api.py index 585168e67..fba2b739a 100644 --- a/bazarr/api.py +++ b/bazarr/api.py @@ -371,11 +371,12 @@ class Languages(Resource): if not any(x['code2'] == code2 for x in languages_dicts): languages_dicts.append({ 'code2': code2, - 'name': language_from_alpha2(language), + 'name': language_from_alpha2(code2), # Compatibility: Use false temporarily 'enabled': False }) return jsonify(sorted(languages_dicts, key=itemgetter('name'))) + result = TableSettingsLanguages.select(TableSettingsLanguages.name, TableSettingsLanguages.code2, TableSettingsLanguages.enabled)\