Skip to content
Last.fm is disabling API Keys for non-paid accounts December 1st.Learn More

All versions since v0.21.2

v0.21.2

What’s New?

Last.fm Api Keys Require Pro Accounts on Dec 1

If you haven’t already seen the news, Last.fm made an announcement that all new and existing API keys for non-pro (non-paid) accounts will stop working December 1st.

Multi-Scrobbler users with Last.fm Sources or Clients will now see a logged warning about this deadline. The docs have also been updated with this information and guidance on what you can do to preserve your data. Which leads in to…

Scrobble Imports/Exports and Migration

Multi-Scrobbler now supports importing scrobbles from Last.fm and exporting to any configured Clients. 🚀

You can import directly from a Last.fm Source/Client, or use one of the supported, third-party file export tools mentioned in the docs.

Importing and Exporting are separate, independent processes so you can import now to save your data from Last.fm and then decide later how and where you want to export it to.

Support for importing from more Clients will come in the future, along with more export options, but I needed to get this release out now in order to give users as much time as possible to get their data out of Last.fm before the deadline.

See the new Import/Export section in the docs sidebar to get started.

ATProto Rate Limits

ATProto-based Clients, Teal.fm and Rocksky, have always tracked PDS usage rate limits but hitting these limits has never been an issue due to the “live scrobble only” design of Multi-Scrobbler up until this point.

With the introduction of scrobble exporting its very possible large exports could now hit these limits. To address this, MS now enables you to set “soft limits” usage reserve points for both export Jobs and live scrobbling.

In practice, this means you could set MS to pause an export Job when you hit, for example, ~80% usage and pause live scrobbling if you hit ~90% usage, this way your other PDS activity (posting/liking/commenting on Bluesky etc..) is never interrupted because of MS activity.

See the new Rate Limit Reserve expandable section in the Configuration section of Teal/Rocksky clients in the docs.

Improved Api Docs and Validation

A large set of typescript-only interfaces have been refactored to use Zod so that most of the public API surface now has real request and response data types documented. This also enables real request/parameter validation so that any tools using the MS Api can now get back useful errors when their requests are malformed.

The publicly-documented API is still not stable but it is getting much closer to a stable release.

v0.21.3 Latest

What’s New?

New Transform Features

Play Transforms includes two new features that enable you to filter out, or flag, Plays that should not be automatically scrobbled.

Set Play State Based on Stage Outcome

Play State Control adds additional configuration next to Stage Flow Control on your stages. It allows you to set the state of a Play based on the outcome of the Stage.

In plain terms, you can now do this:

  • if the Musicbrainz Stage matches your Play data, use its corrected data (and continue as normal)
  • If the Musicbrainz Stage fails to match your Play data, set the Play state as Needs Review and do not forward it to a Client (or scrobble it)

with this configuration:

{
"playTransform": {
"preCompare": [
{
"type": "musicbrainz",
"onFailureAction": "review"
}
]
}
}

Possible actions are:

  • approve - operate as normal or negate one of the below actions
  • discard - drop this Play, set state as Discarded and do not forward it
  • review - flag for review, set state as Needs Review and do not forward it

These can be set for the same types as Stage Control: onSuccessAction, onFailureAction, and onSkipAction

These actions also persist through all Stages so you can, for example, “mark” a Play as review in an earlier Stage then clear it in a later Stage with approve.

This gives you granular control over what type of Plays end up being processed. Plays set to Discarded and Needs Reviews can be filtered/searched for in the dashboard.

These actions also apply to Export Jobs:

  • A Play that gets discard can be dropped before exporting, or exported directly as Discarded to the Client
  • A Play that gets review is exported directly as In Review to the Client

Match Stage

The Match Stage is a pure comparison stage that does not make any modifications to your Play data. Use it to match, or compare, different properties of the Play being processed. If your rules match, the Stage succeeds, if it does not match then Stage fails.

This Stage is particularly useful with the above Play State Controls, use it to match on patterns in your Play data and set an action without needing to modify the Play.

Lastly, You can now match on additional properties in when conditions as well as with Match:

  • user deviceId library playlist and musicService - if the Play includes these, matched with string/regex
  • duration (length of a track) and listenedFor (how long you listened to it) - matched with a comparison and time unit IE "duration": "< 45 s" => match when play length is less than 45 seconds

ATProto and Mirrors

ATProto Source/Client (Teal.fm and Rocksky) share code with the new Mirrors concept from Import/Export Jobs but did not actually leverage them in the last release.

This release converts the historical plays and Sync operations for these Sources/Clients into locked Mirrors that are now visible from the Mirrors page.

Additionally, their usage of repo exports (CAR files) has been improved to reduce the amount of space each Play takes up and, when used for checking for duplicates, now dynamically imports historical Play ranges as needed rather than requiring the entire repository be parsed into the database.

This requires an automatic migration that will occur after upgrading. If you have a large (10k+ scrobbles) history in teal.fm/rocksky and are using either of these source/clients today you may want to reclaim disk space after upgrading.

Listenbrainz and Native Transform Improvements

Listenbrainz Source/Endpoint, and the Native Transform Stage, share some code that tries to extract artists out of artist/title strings (like Foo feat. Cool Guy).

That code has now been consolidated and improved so testing is easier, the functionality is more flexible, and extraction decisions are auditable.

After upgrading, Plays parsed from LZ sources and in Native Transform will surface a new timeline parse event that details how extraction decisions were made with a diff of the exact changes made to artists/title.

image image image

Hardening Ingress Routes and Sources

Ingress Source routes, like Listenbrainz and Webscrobbler, are not gated by Authentication because they need to stay compatible with third party clients that use them.

More improvements have now been made to these routes to harden them for public exposure:

  • If you do not have any Sources using these routes then requests to them are always dropped without reading/parsing any part of the request
  • When Sources using them are present, auth/identification (matching on token or slug) is now done before the body is of the request is parsed
  • Tracking ingress through logging (showing first request from IP/user agent) has been hardened to keep in-memory usage minimal

Import/Export Job Data Issues Insight

Import Jobs now surface more info about skipped data

image

MS now looks for common data issues in a Mirror’s imported data:

  • invalid timestamps (before jan 2 1970)
  • burst scrobbles - exact artist/title with same timestamp only 1-2 seconds apart, more than 3 in a row

These are common problems with Last.fm datasets. These are shown with a sample of the Play affected on a Mirror’s detail page

image

On a Job’s export panel you can now decide how you want to address plays with data issues by

  • skipping bad timestamps
  • collapsing any set of burst scrobbles into one scrobble, so at least you have one good, valid scrobble to export
  • (dangerously) keep bad timestamps to pad playcounts, collapse all other burst scrobbles into one scrobble
image

Using skip bad timestamps and one play per burst is recommended. Be sure to read risks of dangerously keeping bad timestamps in the docs before using that option.

Other Changelog Highlights

⛰️ Features

  • (caa) Fallback to trying release group mbid if no art found for release #794
  • (ingress) Warn that ingress sources without a token, slug, or apiKey are deprecated
  • (ingress) Add per-Source maxBodySize option for LZ and LFM endpoint Sources

🐛 Bug Fixes

  • (listenbrainz) Map missing release_group_mbid from user listens to PlayObject credit #795
  • (listenbrainz) Use mapped artists when they fully explain submitted artist name #794
  • (subsonic) Store numeric playerId as a string deviceId #802 thanks @brennanneoh
  • (sonos) treat non-string duration and position as unknown #805 thanks @schmitzkr
  • (webscrobbler) Parse stateUpdatedAt as milliseconds #807

📚 Documentation

  • (jobs) Document job behavior on server restart #800 thanks @aitorres
  • (listenbrainz) Document mapping checks, conservative fallback and parse decisions
  • (No Category) Add sync status to atproto clients
  • (No Category) Add guidance for play state control during Jobs
  • (No Category) Add note about discarding plays via transform action