Skip to content

Cover Art Archive Stage

The Cover Art Archive Stage finds album art for your Play using Cover Art Archive, a free and open collection of album art that is part of MusicBrainz.

This Stage is useful for adding artwork to scrobbles from Sources that do not provide any art.

This Stage is simpler than other Stages: it only changes the art of your Play and only runs when your Play does not already have art (by default).

No API setup is required. APIs can still be configured in the event you are using mirrors, a proxy, or want to configure different rate limiting.

To use the default Stage in Rules and Hooks either omit name or specify it as "name": "MSDefault".

Non-Default Servers and Rate Limiting

Other, or additional, Cover Art Archive Servers/Mirrors can be added to the API configuration. If more than one server is defined then multi-scrobbler will load balance requests based on available rate capacity.

Use url to define the base URL of the Cover Art Archive server to use. If url is not defined multi-scrobbler assumes it is the primary Cover Art Archive server, https://coverartarchive.org.

Example of multiple servers:

config.json
{
// ...your AIO Config
"transformers": [
{
"type": "coverartarchive",
"name": "MyCAA",
"data": {
"apis": [
{
"enable": true1
},
{2
"enable": true,
"url": "https://my.caa.mirror.domain.com"
}
]
},
}
]
}
  1. 1.uses default Cover Art Archive server https://coverartarchive.org
  2. 2.additional server

Rate Limiting

Cover Art Archive servers can optionally be configured with rate limiting.

Rate limiting is defined by max number of requests within timespan of N seconds. If no rate limit is configured then a default of 100 req/s is used.

Example of configuring rate limit:

config.json
{
// ...your AIO Config
"transformers": [
{
"type": "coverartarchive",
"name": "MyCAA",
"data": {
"apis": [
{
"enable": true,
"rate": {1
"requests": 10,2
"perTime": 13
}
}
]
},
}
]
}
  1. 1.IE 10 req/s
  2. 2.maximum of 10 requests
  3. 3.can be made within 1 second

All of the properties found in the Finding Art section are configured in Stage Configuration as defaults.

Example:

config.json
{
// ...your AIO Config
"transformers": [
{
"type": "coverartarchive",
"name": "MyCAA",
"defaults": {
"allowedTypes": ["any"],
"preferredSizes": ["500"]
}
}
]
}

Add your Stage to a Source or Client by specifying it in a Hook:

discord.json
[
{
// ...your Discord File Config
"name": "MyDiscord",
"data": { /* ... */},
"options": {
"playTransform": {
"preCompare": [
{
"type": "coverartarchive",
"name": "MSDefault"
}
]
}
}
}
]

This Stage only has one Stage Rule: art. It should be either a boolean, specifying if the found art should be used, or a when condition. If art is not set it defaults to true.

Example
discord.json
[
{
// ...your Discord File Config
"name": "MyDiscord",
"data": { /* ... */},
"options": {
"playTransform": {
"preCompare": [
{
"type": "coverartarchive",
"name": "MSDefault",
"art": {
"when": {/* ... */},1
}
}
]
}
}
}
]
  1. 1.will only apply art to Play if "when" is satisfied

The general configuration shown above can also be configured from a selection of presets using ENV Config for individual Sources/Clients.

To configure stage defaults use CAA_PRESETS with a comma-delimited list of presets you wish to apply. More than one preset can be applied, in which case they combine. If CAA_PRESETS is not set the stage will use defaults.

  • default - Only uses art that is marked as the front cover of the album. This is the same as using no presets.
  • any - Uses art of any type: front cover, back cover, or booklet.

Finally, use ENV *_TRANSFORMS=coverartarchive on each Source/Client you wish to apply this stage to. This applies the stage in the preCompare Hook with all Rules enabled.

The * stands for the prefix used for each Source/Client’s ENV keys. Refer to the individual Source/Client Configuration sections to find this. Example:

  • All Jellyfin Sources ENVs look like JELLYFIN_URL=192.168.0.110:8096 etc…
  • Use JELLYFIN_TRANSFORMS=coverartarchive
Example Full Docker Deploy with ENV Configuration

Using Jellyfin example from Quickstart with the Musicbrainz Stage and the Cover Art Archive Stage:

docker-compose.yml
services:
multi-scrobbler:
image: foxxmd/multi-scrobbler
container_name: multi-scrobbler
environment:
- MB_PRESETS=default
- CAA_PRESETS=any1
- JELLYFIN_URL=192.168.0.110:8096
- JELLYFIN_APIKEY=c9fae8756fbf481ebd9c5bb56b
- JELLYFIN_USER=MyUser
- JELLYFIN_TRANSFORMS=musicbrainz,coverartarchive2
- MALOJA_URL=http://domain.tld:42010
- MALOJA_API_KEY=1234
volumes:
- "./config:/config"
ports:
- "9078:9078"
restart: unless-stopped
  1. 1.allow any type of art, not only front covers
  2. 2.adds MBIDs with Musicbrainz Stage, then finds art with Cover Art Archive Stage

To use the configured ENV stage in Rules and Hooks with File/AIO config either omit name or specify it as "name": "MSEnv".

Before MS searches for art it checks if your Play already has album art. By default, if your Play has album art then the Stage is skipped.

Use these options to change when MS searches:

  • forceSearch (default false) - Always search, even when your Play already has album art
Example
"defaults": {
//"forceSearch": true1
}
  1. 1.uncomment to make the stage always search, even if album art is present

MS looks up art using the MBIDs in your Play, in this order:

  1. The album MBID (MusicBrainz calls this a Release). This is the exact version of the album you listened to, like a special edition or a specific country’s release.
  2. The album group MBID (MusicBrainz calls this a Release Group). This covers all versions of the same album. MS only uses it when step 1 does not find art that meets your requirements.

When one step finds art that meets your requirements, MS stops and uses that art.

Cover Art Archive labels each image with what it shows. Use allowedTypes to choose which images MS may use. Can contain any of:

  • front - The front cover of the album
  • back - The back cover of the album
  • booklet - A page from the booklet that comes with the album
  • any - Any image, no matter what it shows

The default is ["front"].

"defaults": {
"allowedTypes": ["any"]1
}
  1. 1.allow any image

Cover Art Archive has each image in different sizes. Sizes are measured in pixels (the width of the image). Available sizes are:

  • 250 - small
  • 500 - medium
  • 1200 - large

There are two options for sizes:

  • allowedSizes (default ["any"]) - Only use images that are available in these sizes. An image must be available in at least one size you list, or use any to allow any image.
  • preferredSizes (default ["250", "500", "1200"]) - The sizes you want, in order. MS uses the first size in your list that is available. If none are available, MS uses any size the image has.
"defaults": {
"allowedSizes": ["1200","500"],1
"preferredSizes": ["1200", "500"]2
}
  1. 1.allow art with either 1200 or 500 sizes
  2. 2.prefer the largest size first

You should setup metadata caching to reduce API calls, improve transform performance, and reduce memory usage when using this stage.

This Stage needs an album MBID in your Play. Many Sources do not provide MBIDs. Put a Stage that adds MBIDs, like Musicbrainz or Rocksky, before this Stage in the same Hook.

Set failureReturnPartial: true on this Stage. Then, if this Stage cannot find art, the changes from the earlier Stage are still kept.

Example
jellyfin.json
[
{
// ...your Jellyfin File Config
"name": "MyJellyfin",
"data": { /* ... */},
"options": {
"playTransform": {
"preCompare": [
{
"type": "musicbrainz",1
"name": "MSDefault"
},
{
"type": "coverartarchive",2
"name": "MSDefault",
}
]
}
}
}
]
  1. 1.adds MBIDs to the Play
  2. 2.uses the MBIDs to find art
  3. 3.keep Musicbrainz changes even if no art is found
Example
jellyfin.json
[
{
// ...your Jellyfin File Config
"name": "MyJellyfin",
"data": { /* ... */},
"options": {
"playTransform": {
"preCompare": [
{
"type": "coverartarchive",
"name": "MSDefault"
}
]
}
}
}
]

Or using a Jellyfin Source with ENV Config:

docker-compose.yml
services:
multi-scrobbler:
image: foxxmd/multi-scrobbler
environment:
# ... your source ENVs go here
#
- JELLYFIN_TRANSFORMS=coverartarchive1
volumes:
- "./config:/config"
ports:
- "9078:9078"
restart: unless-stopped
  1. 1.applies Cover Art Archive Stage to preCompare of Jellyfin Source

The Discord Client shows album art when your Play has art. Use the Musicbrainz Stage and the Cover Art Archive Stage on the preCompare hook for your Discord client so that missing art is added.

Example

Using the ENV Configuration from above, add these fields to your docker compose environment:

- CAA_PRESETS=any
- DISCORD_TRANSFORMS=musicbrainz,coverartarchive