Skip to main content

Listenbrainz (Endpoint)

This Source enables multi-scrobbler to accept scrobbles from outside applications as if it was a Listenbrainz server.

If your service/player has a "Scrobble to Listenbrainz" feature and there is an option to set the Listenbrainz URL then multi-scrobbler can accept scrobbles from that service/player by imitating a real Listenbrainz server.

Other Uses

Setup

Scenario Picker

Use one of the scenarios below based on how on your service(s) (things "scrobbling" to Multi-Scrobbler using this Source) will need to interact with MS.

You have one service, like Navidrome, that will scrobble to Multi-Scrobbler.

Configure one Listenbrainz Endpoint Source. Use the standard base URL to configure your service and set a Token, if necessary. Use the same Token in MS as you do in your service.

Standard Base URL

In most scenarios you should use one of the following as the base URL when configuring your service to scrobble to multi-scrobbler:

  • http://myMultiScrobblerIP:9078
  • http://myMultiScrobblerIP:9078/1/
Default Scrobble Submit URL

Multi-scrobbler will accept Listenbrainz scrobbles at

http://myMultiScrobblerIP:9078/1/submit-listens

which is the standard Listenbrainz server path for scrobbling.

Token

Most Listenbrainz clients require an Authentication Token to be provided during setup. This value can be anything you want but ensure you use the same value for token (ENV LZE_TOKEN) in your configuration for this Listenbrainz Endpoint Source.

If your service does not require a token, or does not let you set one, then do not configure it for this Source either.

Multiple Sources

If you need configure more than one Listenbrainz Endpoint Source then MS can differentiate scrobbles based on Token so that you can use the same, standard base URL for many users.

However, if you cannot configure multiple tokens for your scenario you may also use a URL Slug to tell MS which Source belongs to a specific user. This is not a common scenario and should only be used if Token configuration is not sufficient or not possible.

Different URL Base (Slug)

When a slug is defined in ENV/File config MS will listen for listenbrainz submit-listens requests using the slug as the base route path. Example:

LZE_SLUG=foobar

MS will accept requests for submit-listens (scrobble submissions and now playing) at

http://myMultiScrobblerIP:9078/api/listenbrainz/foobar
http://myMultiScrobblerIP:9078/api/listenbrainz/foobar/submit-listens
Details

Set the ListenBrainz.BaseURL (env ND_LISTENBRAINZ_BASEURL) to http://myMultiScrobblerIP:9078/1/

Music Assistant

Details

Music Assistant Docs

  • In your Music Assistant UI navigate to Settings -> Plugins
  • Click Add a plugin
    • Add ListenBrainz Scrobbler
  • In the ListenBrainz Scrobbler configuration screen:
    • User Token is the Token you configured
    • Toggle Show advanced settings
      • Base URL is the URL you can configured, or the equivalent of http://myMultiScrobblerIP:9078 for your MS instance
  • Save the configuration and you are ready to scrobble

To troubleshoot any errors, and assuming you are using Home Assistant, view the Logs in the Music Assistant Add-ons. Please include these logs in any reported issue.

Troubleshooting URL

If you think your service should be able to use the standard base URL but it is not working follow these steps before trying the the base URL Slug.

Verify URL Format

Some service may require http/https in the URL format (http://myMSDomainOrIp:9078) while others may not (myDomainOrIp:9078). Check the docs for your service to see if they specify this or have an example. Try both versions, if possible, to see if one works.

Some Services Require HTTPS

Some services that can scrobble to a custom Listenbrainz URL may require the URL to have a real domain (example.com) and/or use SSL (https://). In this case you should setup multi-scrobbler behind a reverse proxy to support this functionality.

Is MS is Reachable?

Verify that MS can be accessed by your service, or from the same host as the service is running. See the FAQ for guidance on troubleshooting ingress connection issues.

Service Logging

If you service has accessible logging, check to see if it outputs the URL it is trying to reach when authenticating the Listenbrainz account/user, or trying to make a scrobble request.

If you decide to report this issue, please include this logging in your issue.

Configuration

Configuration Type

This is configuration for the ENV Config Type.

Environmental VariableTypeDefaultDescription
LZE_IDstringA globally unique ID EX myComponentId
LZE_NAMEstringValue of LZE_IDA vanity name EX My Cool Component
LZE_ENABLEbooleantrueShould this component be used?
LZE_SLUGstringWhen using multiple sources without tokens, or not using a standard base URL, this is the URL base path that should be used to identify scrobbles for this source
LZE_TOKENstringIf an LZ submission request contains this token in the Authorization Header it will be used to match the submission with this Source
LZE_USERNAMEstringThe listenbrainz "username" to associate with this Source

Bold/Italic = Required