diff --git a/docsite/docs/configuration/clients/koito.mdx b/docsite/docs/configuration/clients/koito.mdx index 34e213da..9c34eeeb 100644 --- a/docsite/docs/configuration/clients/koito.mdx +++ b/docsite/docs/configuration/clients/koito.mdx @@ -45,7 +45,7 @@ Using the URL path `/apis/listenbrainz` [Koito docs describe](https://koito.io/g :::tip -Ensure that Koito is configured to allow requests from multi-scrobbler! In Koito config set [`KOITO_ALLOWED_HOSTS`](https://koito.io/reference/configuration/#koito_allowed_hosts) to the IP the multi-scrobbler dashboard is accessible from. +For Koito versions <=0.1.7, you must have the environment variable KOITO_ALLOWED_HOSTS set correctly in your Koito environment/container. Ensure it is set to the IP address or domain name that you use to access Koito with e.g. `koito.mydomain.com`. ::: @@ -57,4 +57,4 @@ Ensure that Koito is configured to allow requests from multi-scrobbler! In Koito | `KOITO_TOKEN` | Yes | | API Key from your Koito Account | | `KOITO_USER` | Yes | | Your Koito username | | `KOITO_URL` | No | | The base URL for the Koito server | - \ No newline at end of file + diff --git a/docsite/docs/quickstart.mdx b/docsite/docs/quickstart.mdx index 9f7a4800..06e345a6 100644 --- a/docsite/docs/quickstart.mdx +++ b/docsite/docs/quickstart.mdx @@ -254,9 +254,9 @@ Modify the `lastfm.json` file you created in the [Setup Sources](#setup-sources) ``` :::tip - - Ensure that Koito is configured to allow requests from multi-scrobbler! In Koito config set [`KOITO_ALLOWED_HOSTS`](https://koito.io/reference/configuration/#koito_allowed_hosts) to the IP the multi-scrobbler dashboard is accessible from. - + + For Koito versions <=0.1.7, you must have the environment variable KOITO_ALLOWED_HOSTS set correctly in your Koito environment/container. Ensure it is set to the IP address or domain name that you use to access Koito with e.g. `koito.mydomain.com`. + ::: diff --git a/src/backend/common/vendor/koito/KoitoApiClient.ts b/src/backend/common/vendor/koito/KoitoApiClient.ts index 45ba59cb..72999b0d 100644 --- a/src/backend/common/vendor/koito/KoitoApiClient.ts +++ b/src/backend/common/vendor/koito/KoitoApiClient.ts @@ -118,7 +118,7 @@ export class KoitoApiClient extends AbstractApiClient implements PaginatedTimeRa let allowedHint = ''; if(e.cause !== undefined && 'response' in e.cause) { if(e.cause.response.status === 403) { - allowedHint = ` HINT: 403 usually means Koito env KOITO_ALLOWED_HOSTS is not configured correctly to allowed requests from multi-scrobbler. Check Koito logs for warnings.` + allowedHint = ` HINT: 403 usually means Koito env KOITO_ALLOWED_HOSTS is not configured correctly. Check Koito logs for warnings.` } } throw new Error(`A server exists at ${this.url.url.hostname}:${this.url.port} but is not responding to API calls as expected.${allowedHint}`, { cause: e }); @@ -158,7 +158,7 @@ export class KoitoApiClient extends AbstractApiClient implements PaginatedTimeRa let resp: ListensResponse; try { - resp = await this.getUserListens({...params, page: params.cursor}); + resp = await this.getUserListens({...params, page: params.cursor}); } catch (e) { throw new Error('Error occurred while getting Koito paginated listens', { cause: e }); } @@ -239,4 +239,4 @@ export const listenObjectResponseToPlay = (obj: ListenObjectResponse, options: { } } return baseFormatPlayObj(obj, play); -} \ No newline at end of file +}