From e41b7e19d429cae5ae8e80c1ecf2e98e33e38a33 Mon Sep 17 00:00:00 2001 From: j Date: Sun, 9 Jul 2023 09:58:54 +0530 Subject: [PATCH] only take first locale --- pandora/app/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora/app/views.py b/pandora/app/views.py index 411fb813..2abd1f99 100644 --- a/pandora/app/views.py +++ b/pandora/app/views.py @@ -163,7 +163,7 @@ def init(request, data): del config['keys'] if 'HTTP_ACCEPT_LANGUAGE' in request.META: - response['data']['locale'] = request.META['HTTP_ACCEPT_LANGUAGE'].split(';')[0].split('-')[0] + response['data']['locale'] = request.META['HTTP_ACCEPT_LANGUAGE'].split(';')[0].split('-')[0].split(',')[0] if request.META.get('HTTP_X_PREFIX') == 'NO': config['site']['videoprefix'] = ''