mirror of
https://github.com/wkulhanek/bonob.git
synced 2025-12-21 17:33:29 +01:00
Case-insensitive lang search for i8n, along with support for match just lang, without region, ie. 'en' == 'en-US'
This commit is contained in:
@@ -536,9 +536,10 @@ function bindSmapiSoapServiceToExpress(
|
||||
.then(splitId(id))
|
||||
.then(({ musicLibrary, accessToken, type, typeId }) => {
|
||||
const paging = { _index: index, _count: count };
|
||||
const lang = i8n((headers["accept-language"] || "en-US") as LANG);
|
||||
const acceptLanguage = headers["accept-language"];
|
||||
const lang = i8n((acceptLanguage || "en-US") as LANG);
|
||||
logger.debug(
|
||||
`Fetching metadata type=${type}, typeId=${typeId}, lang=${lang}`
|
||||
`Fetching metadata type=${type}, typeId=${typeId}, acceptLanguage=${acceptLanguage}`
|
||||
);
|
||||
|
||||
const albums = (q: AlbumQuery): Promise<GetMetadataResponse> =>
|
||||
|
||||
Reference in New Issue
Block a user