fix(metadata): send Accept-Language on Deezer requests so names follow the app language

Deezer localizes artist and genre names by IP geolocation when no language
is given, so users behind e.g. Arabic-region IPs got Arabic metadata on an
English device (VPN 'fixed' it). The app's display language is now pushed
to the backend and sent as Accept-Language, with an en-US default.

Fixes #480
This commit is contained in:
zarzet
2026-07-14 15:46:33 +07:00
parent 9ac10dd6bb
commit 3833a66bf6
5 changed files with 51 additions and 0 deletions
@@ -3152,6 +3152,13 @@ class MainActivity: FlutterFragmentActivity() {
}
result.success(null)
}
"setMetadataLanguage" -> {
val tag = call.argument<String>("tag") ?: ""
withContext(Dispatchers.IO) {
Gobackend.setMetadataLanguage(tag)
}
result.success(null)
}
"getLogCount" -> {
val count = withContext(Dispatchers.IO) {
Gobackend.getLogCount()