diff --git a/docsite/docs/configuration/clients/listenbrainz.mdx b/docsite/docs/configuration/clients/listenbrainz.mdx index 247e5e6b..8a983da1 100644 --- a/docsite/docs/configuration/clients/listenbrainz.mdx +++ b/docsite/docs/configuration/clients/listenbrainz.mdx @@ -21,18 +21,6 @@ You will need to run your own Listenbrainz server or have an account [on the off On your [profile page](https://listenbrainz.org/profile/) find your **User Token** to use in the configuration. -:::important[Contact] - -It is **strongly recommended** to include `contact` (File/AIO) or `LZ_CONTACT` (ENV) property in your configuration. - -This is a [new requirement from Listenbrainz](https://listenbrainz.readthedocs.io/en/latest/users/api/index.html#id5) to help with bot/spam prevention. - -**Your traffic to Listenbrainz is more likely to be blocked if this point of contact is not included!** - -It is currently optional due to backwards compatibility but will likely become mandatory for Multi-Scrobbler config in the future. - -::: - ## Configuration diff --git a/docsite/docs/configuration/sources/listenbrainz-source.mdx b/docsite/docs/configuration/sources/listenbrainz-source.mdx index 8ff0c536..f3d0f80b 100644 --- a/docsite/docs/configuration/sources/listenbrainz-source.mdx +++ b/docsite/docs/configuration/sources/listenbrainz-source.mdx @@ -24,19 +24,6 @@ You will need to run your own Listenbrainz server or have an account [on the off On your [profile page](https://listenbrainz.org/profile/) find your **User Token** to use in the configuration. -:::important[Contact] - -It is **strongly recommended** to include `contact` (File/AIO) or `SOURCE_LZ_CONTACT` (ENV) property in your configuration. - -This is a [new requirement from Listenbrainz](https://listenbrainz.readthedocs.io/en/latest/users/api/index.html#id5) to help with bot/spam prevention. - -**Your traffic to Listenbrainz is more likely to be blocked if this point of contact is not included!** - -It is currently optional due to backwards compatibility but will likely become mandatory for Multi-Scrobbler config in the future. - -::: - - ## Configuration diff --git a/src/backend/common/infrastructure/config/client/listenbrainz.ts b/src/backend/common/infrastructure/config/client/listenbrainz.ts index 6f90f7e2..33b02632 100644 --- a/src/backend/common/infrastructure/config/client/listenbrainz.ts +++ b/src/backend/common/infrastructure/config/client/listenbrainz.ts @@ -38,7 +38,7 @@ export const listenBrainzDataSchema = z.object({ * */ contact: z.string().optional().meta({ - description: 'A website or email Listenbrainz can contact you at in case of issues. **This will become a required property in the future.**', + description: '(If running a forked version of multi-scrobbler) A website or email Listenbrainz can contact you at in case of issues', examples: ['contact@mydomain.com'] }) }); diff --git a/src/backend/common/vendor/ListenbrainzApiClient.ts b/src/backend/common/vendor/ListenbrainzApiClient.ts index e6a8c760..52200b84 100644 --- a/src/backend/common/vendor/ListenbrainzApiClient.ts +++ b/src/backend/common/vendor/ListenbrainzApiClient.ts @@ -68,7 +68,7 @@ export class ListenbrainzApiClient extends AbstractApiClient implements Pageless url = 'https://api.listenbrainz.org/' } = config; let cleanUrl = url; - this.userAgent = `multi-scrobbler/${getRoot().items.version}${config.contact !== undefined ? ` (${config.contact})` : ''}` + this.userAgent = `multi-scrobbler/${getRoot().items.version} (${config.contact ?? 'contact@multi-scrobbler.app'})` const pathedUrl = normalizeListenbrainzUrl(cleanUrl); if(pathedUrl !== undefined) { this.logger.verbose(`LZ Server URL contained /1/, removing this because MS adds it automatically`); diff --git a/src/backend/scrobblers/ListenbrainzScrobbler.ts b/src/backend/scrobblers/ListenbrainzScrobbler.ts index eded8795..29d1e130 100644 --- a/src/backend/scrobblers/ListenbrainzScrobbler.ts +++ b/src/backend/scrobblers/ListenbrainzScrobbler.ts @@ -40,15 +40,11 @@ export default class ListenbrainzScrobbler extends AbstractScrobbleClient { const { data: { token, - contact, } = {} } = this.config; if (token === undefined) { throw new Error('Must provide a User Token'); } - if(contact === undefined) { - this.logger.warn(`The 'contact' property is missing from your configuration! This is a STRONGLY recommended field that will become mandatory in the future. Listenbrainz is more likely to block your traffic when no contact is provided.`); - } return true; } diff --git a/src/backend/sources/ListenbrainzSource.ts b/src/backend/sources/ListenbrainzSource.ts index 93296749..1501f3ed 100644 --- a/src/backend/sources/ListenbrainzSource.ts +++ b/src/backend/sources/ListenbrainzSource.ts @@ -54,15 +54,11 @@ export default class ListenbrainzSource extends MemorySource { const { data: { token, - contact, } = {} } = this.config; if (token === undefined) { throw new Error('Must provide a User Token'); } - if(contact === undefined) { - this.logger.warn(`The 'contact' property is missing from your configuration! This is a STRONGLY recommended field that will become mandatory in the future. Listenbrainz is more likely to block your traffic when no contact is provided.`); - } return true; }