Skip to main content

Lastfm (Endpoint)

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

Other Uses
Recommended Alternative

This Source has the same data limitations as the Last.fm (Source) and Last.fm (Client) have: Last.fm does not support separating artists/album artists fields which means any multi-artist tracks will have all artists combined into one string. This makes scrobbling to other services, and using metadata corrections like Musicbrainz, more difficult.

If your application has the option to scrobble using Listenbrainz then use the Listenbrainz (Endpoint) Source instead.

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 Panoscrobbler, that will scrobble to Multi-Scrobbler.

Configure one Last.fm Endpoint Source. Use the standard base URL to configure your service and apikey/user, if necessary. Use the same apikey/user in MS as you do in your service.

Standard Base URL

When setting up your Last.fm client to communicate with Multi-Scrobbler replace the Last.fm domain with your Multi-Scrobbler domain:

https://last.fm => https://yourMSDomain

MS accepts Last.fm API calls with the same url base and structure as the last.fm api, IE http://yourMSDomain/2.0/

Authentication

If you are only setting up one Lastfm Endpoint Source then you do not need to configure any explicit username/apiKey/password for MS. If your Last.fm Client requires these credentials use any fake values you want.

Supported Auth Types

Currently, Multi-Scrobbler only supports the Mobile Application auth flow. If your client requires one of the other authentication flows please open an issue.

Note: Your client does not need to implement any auth in order to use a Lastfm Endpoint Source. You can directly make track.scrobble or track.updateNowPlaying api calls to http://yourMSDomain/2.0/ with any fake auth data you want.

Multiple Sources

If you need configure more than one Lastfm Endpoint Source then you should configure username/apiKey for MS, per Source. This enables MS to differentiate scrobbles for each Source.

Use the same username and/or API Key you configure with MS when setting up your Last.fm Client. These values can be anything you want, as long as they match between MS and your client. Password can be anything and is not checked.

However, if you cannot configure username/apiKeys 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 username/apiKey configuration is not sufficient or not possible.

Different URL Base (Slug)

If you cannot use different username/apiKey per Source (or Last.fm Client) you can still differentiate Sources by using a different url base (slug) for Last.fm communication.

Setting a slug in config will change the url base for MS like this:

slug: "mySlug"
http://yourMsDomain/api/lastfm/mySlug

The above url base is equivalent to making calls to http://yourMSDomain/2.0/

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 Last.fm 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 Last.fm apiKey/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
LFM_IDstringA globally unique ID EX myComponentId
LFM_NAMEstringValue of LFM_IDA vanity name EX My Cool Component
LFM_ENABLEbooleantrueShould this component be used?
LFM_SLUGstringWhen using multiple sources without apikey/user, or not using the standard base URL, this is the URL base path that should be used to identify scrobbles for this source
LFM_USERNAMEstringA fake username to differentiate LFM Endpoint Sources
LFM_API_KEYstringA fake api key to differentiate LFM Endpoint Sources

Bold/Italic = Required