Libre.fm
- To monitor and re-scrobble activity from your Libre.fm account create a Libre.fm (Source)
To use the official Libre.fm instance you will need an account. Or, you can run your own Libre.fm instance using the legacy source code.
No API account, API Key, or Secret is needed to use the Libre.fm API. Instead, use any values for API Key/Secret in the configuration. Authentication is done by allowing access from your account on redirect.
Callback/Redirect URL
The Redirect (Callback) URL is used to redirect your browser to multi-scrobbler after authentication has completed.
So, the base of the URL you use should be the same as the URL you would use to navigate to the multi-scrobbler dashboard.
Example
If you can visit the multi-scrobbler dashboard by navigating to http://192.168.0.100:9078 in your web browser...
then the ENV LIBREFM_REDIRECT_URI, or redirectUri for libre.fm json config, should be
http://192.168.0.100:9078/librefm/callback
The Redirect URL can be explicitly specified in the configuration below, or by using the global Base URL setting.
Custom Libre.fm instance
If you are not using the official Libre.fm instance then specify your custom instance using ENV LIBREFM_URLBASE or urlBase property in the data section in File/AIO config.
The value should be protocol://libre.tld/path/prefix EX:
https://my.cool.libre.com/2.0/
Configuration
- ENV
- File
- AIO
This is configuration for the ENV Config Type.
| Environmental Variable | Required? | Default | Description |
|---|---|---|---|
LIBREFM_ENABLE | No | Set to true to enable Libre.fm, if not using any of the below variables | |
LIBREFM_API_KEY | No | anything | Optional API Key |
LIBREFM_SECRET | No | anything | Optional shared secret |
LIBREFM_REDIRECT_URI | No | http://localhost:9078/librefm/callback | Url to use for authentication. Must include librefm/callback somewhere in it |
LIBREFM_SESSION | No | Session id. Will be generated by authentication flow if not provided. | |
LIBREFM_URLBASE | No | Use for custom Libre.fm instance only. The host + path prefix EX https://my.libre.example/2.0/ |
Config Structure
This displays the structure of the File Configuration for a librefm type Client with all possible properties, their shape, and descriptions/types. Use this to understand how to write a valid config.
Config Example
This displays an example config file of a librefm Client File Configuration that adheres to the shown Config Structure.
- text mode lets you edit the JSON directly.
- tree mode gives you a guided point-and-click editing experience that always keeps the JSON syntax valid.
Both modes validate that the configuraion is correct. Any errors show up as squiggly lines.
After you finish editing, switch to text and then copy all text to get a completed config.
Config Example Mobile Experience
This displays an example config file of a librefm Client File Configuration that adheres to the shown Config Structure.
The example config file editor is meant for a larger screen experience so only the read-only example is shown. Please use this site on a tablet/laptop/desktop to enable file editor features.
[
{
"name": "myLibreFmClient",
"enable": true,
"configureAs": "client",
"data": {
"apiKey": "anything",
"secret": "anything",
"redirectUri": "http://localhost:9078/librefm/callback"
}
}
]
Config Structure
This displays the structure of the all-in-one (config.json) configuration with all possible properties, their shape, and descriptions/types. Use this to understand how to write a valid config.
Select the librefm type from the respective clients node below, then expand it.
Config Example
This displays an example config file of a all-in-one (config.json) configuration that includes a librefm Client that adheres to the shown Config Structure.
- text mode lets you edit the JSON directly.
- tree mode gives you a guided point-and-click editing experience that always keeps the JSON syntax valid.
Both modes validate that the configuraion is correct. Any errors show up as squiggly lines.
After you finish editing, switch to text and then copy all text to get a completed config.
Config Example Mobile Experience
This displays an example config file of a all-in-one (config.json) configuration that includes a librefm Client that adheres to the shown Config Structure.
The example config file editor is meant for a larger screen experience so only the read-only example is shown. Please use this site on a tablet/laptop/desktop to enable file editor features.
{
"clients": [
{
"name": "myLibreFmClient",
"enable": true,
"configureAs": "client",
"data": {
"apiKey": "anything",
"secret": "anything",
"redirectUri": "http://localhost:9078/librefm/callback"
},
"type": "librefm"
}
]
}