[go: up one dir, main page]

Skip to content

Latest commit

 

History

History
250 lines (170 loc) · 11.6 KB

configuration.md

File metadata and controls

250 lines (170 loc) · 11.6 KB

General

General configuration options. These must be set through environmental variables because they affect initial startup of the app. These variables are also available to Docker containers.

Environmental Variable Required? Default Description
CONFIG_DIR No CWD/config Directory to look for all other configuration files
LOG_PATH No CWD/logs If false no logs will be written. If string will be the directory logs are written to
PORT No 9078 Port to run web server on

The app must have permission to write to CONFIG_DIR in order to store the current spotify access token.

Sources and (Scrobble) Clients

The app has two types of configurations:

  • Sources -- Where plays are parsed from
  • Clients -- Scrobble clients that plays are scrobbled to

All configurations can be configured through:

  • environmental variables
  • individual json files for each source/client type found in the CONFIG_DIR directory IE config/spotify.json
  • or through the main config.json (also found in CONFIG_DIR directory) using the clients or sources property under data:
// in config.json
{
  //...
  "sources": [
    {
      "name": "myConfig",
      "type": "spotify",
      "clients": [
        "myMalojaClient"
      ],
      "data": {
        "clientId": "anExample"
        //...
      }
    }
  ]
}

See config.json.example for a short example of this or check out the kitchen sink example.

ENV-Based or JSON-Based?

multi-scrobbler can be configured differently depending on how you will use it. See which use-case fits you the best and then use that approach when setting up each configuration:

ENV-Based (Single User)

  • You are the only person for whom the application is scrobbling
  • You may have many sources (Plex, Spotify, Tautulli...) but you only have one of each type of source
  • You have only one scrobble client
  • Easier for small setups. Difficult for larger, multi-sourced setups (may want to switch to json)
  • Will not work for multi-user setups

JSON-Based (Multi User)

  • You are a single user but want to set up many sources
  • You want to use multi-scrobbler to scrobble for yourself and others IE family, friends, etc.
  • You may have many of each type of Source you want to scrobble from IE 2x Plex accounts, 3x Spotify accounts, 1x Funkwhale...
  • You have more than one scrobble Client you want to scrobble to IE multiple Maloja servers, one for each person
  • You want only some Sources to scrobble to some Clients IE Fred's Spotify account scrobbles to Fred's Maloja server, but not Mary's Maloja server

Note: While you may mix and match configuration approaches it is recommended to only use ENV-based configs if you are doing everything in ENV-based configurations.

Sources

To access your Spotify history you must register an application to get a Client ID/Secret. Make sure to also whitelist your redirect URI in the application settings.

ENV-Based

Environmental Variable Required? Default Description
SPOTIFY_CLIENT_ID Yes
SPOTIFY_CLIENT_SECRET Yes
SPOTIFY_ACCESS_TOKEN No Must include either this token or client id/secret
SPOTIFY_REFRESH_TOKEN No If using access token this is also recommended
SPOTIFY_REDIRECT_URI No http://localhost:{PORT}/callback URI must end in callback

JSON-Based

See spotify.json.example

Check the instructions on how to setup a webhooks to scrobble your plays.

ENV-Based

Environmental Variable Required Default Description
PLEX_USER No The a comma-delimited list of usernames to scrobble tracks for. No usernames specified means all tracks by all users will be scrobbled.

JSON-Based

See plex.json.example

Check the instructions on how to setup a notification agent.

ENV-Based

Environmental Variable Required Default Description
TAUTULLI_USER No The a comma-delimited list of usernames to scrobble tracks for. No usernames specified means all tracks by all users will be scrobbled.

JSON-Based

See tautulli.json.example

Can use this source for any application that implements the Subsonic API (such as Airsonic)

Known Issues:

  • "Time played at" is somewhat inaccurate since the api only reports "played X minutes ago" so...
    • All scrobble times are therefore "on the minute" and you may experience occasional duplicate scrobbles
    • "played X minutes ago" sometimes is also not reported correctly
  • Multiple artists are reported as one value and cannot be separated
  • If using Airsonic Advanced the password used (under Credentials) must be Decodable

ENV-Based

Environmental Variable Required? Default Description
SUBSONIC_USER Yes
SUBSONIC_PASSWORD Yes
SUBSONIC_URL Yes Base url of your subsonic-api server

JSON-Based

See subsonic.json.example

Must be using Jellyfin 10.7 or greater

  • Add the Webhook Plugin repository to your plugins, then restart your server
  • In the Webhook settings:
    • Add Generic Destination
    • In the new Generic dropdown:
      • Webhook Url: http://localhost:9078/jellyfin
      • Notification Type: Playback Progress
      • Item Type: Songs
      • Check Send All Properties
    • Save

ENV-Based

Environmental Variable Required? Default Description
JELLYFIN_USER Comma-separated list of usernames (from Jellyfin) to scrobble for
JELLYFIN_SERVER Comma-separated list of Jellyfin server names to scrobble from

JSON-Based

See jellyfin.json.example

See the Last.fm (Client) setup for registration instructions.

ENV-Based

No support for ENV based for Last.fm as a client (only source)

JSON-Based

See lastfm.json.example, change configureAs to source.

Create a new application at Deezer Developers

  • Application Domain must be the same as your multi-scrobbler domain. Default is localhost:9078
  • Redirect URL must end in deezer/callback
    • Default would be http://localhost:9078/deezer/callback

After application creation you should have credentials displayed in the "My Apps" dashboard. You will need:

  • Application ID
  • Secret Key
  • Redirect URL (if not the default)

If no access token is provided...

After starting multi-scrobbler with credentials in-place open the dashboard (http://localhost:9078) and find your Deezer source. Click (Re)authenticate and (re)start polling to start the login process. After login is complete polling will begin automatically.

ENV-Based

Environmental Variable Required? Default Description
DEEZER_CLIENT_ID Yes Your Application ID
DEEZER_CLIENT_SECRET Yes Your Secret Key
DEEZER_ACCESS_TOKEN No Must include either this token or client id/secret
DEEZER_REDIRECT_URI No http://localhost:{PORT}/deezer/callback URI must end in deezer/callback

JSON-Based

See deezer.json.example

Clients

ENV-Based

Environmental Variable Required? Default Description
MALOJA_URL Yes Base URL of your installation
MALOJA_API_KEY Yes Api Key

JSON-Based

See maloja.json.example

Register for an API account here.

The Callback URL is actually specified by multi-scrobbler but to keep things consistent you should use

http://localhost:9078/lastfm/callback

or replace localhost:9078 with your own base URL

ENV-Based

Environmental Variable Required? Default Description
LASTFM_API_KEY Yes Api Key from your API Account
LASTFM_SECRET Yes Shared secret from your API Account
LASTFM_REDIRECT_URI No http://localhost:{PORT}/lastfm/callback Url to use for authentication. Must include lastfm/callback somewhere in it
LASTFM_SESSION No Session id. Will be generated by authentication flow if not provided.

JSON-Based

See lastfm.json.example