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

Teal.fm

teal.fm is a social discovery and browsing app for scrobbles stored in your Atmosphere Account.

How does that work?

Your Atmosphere Account consists of social data (it’s just JSON) stored in a personal repository on a PDS (Personal Data Server), all of which is standardized under the AT Protocol.

The AT Protocol defines how your data is stored, how you authenticate to write to it, and how indpendent apps share and consume it. Critically, each layer (data storage, app, communication) of the AT Protocol can be operated by indpendent entities so your data and experience not locked behind a walled garden.

Although each layer can be implemented separately (you can self-host everything!), it is normally a simple process for an end-user to create and start using an Atmosphere Account as many apps can do everything for you. The most common example being a Bluesky, but there are other public account providers.

When Multi-Scrobbler uses the AT Protocol…

  • multi-scrobbler “scrobbles” (writes) your plays to your repository
  • when accessing teal.fm, or another application that knows how to read it, your data is pulled from the repository to render their app
Your Data Is Public

Atproto PDS access is public, meaning your scrobbles are also public (read-only). This isn’t any different than using Last.fm or Listenbrainz, in terms of privacy.

Navigate to the Account settings for your Atmosphere account on your respective PDS and create a new App Password.

If you don’t know what a PDS is or how to find this just use Bluesky:

Determining Your Atmosphere Handle/Identifier

Your Atmosphere identifier/handle should be either:

  • A valid DID, starting with did:plc:... or did:web:...
  • Your full Atmosphere Account ATProto handle, including TLD

If using a handle:

  • For regular Bluesky account this will be like: alice.bsky.social
  • For Bluesky accounts that use their domain as their account this is your domain: mydomain.com
  • For non-Bluesky-PDS users, you probably already know your handle

If your identifier does not look like a DID and does not include a TLD then multi-scrobbler will automatically append .bsky.social to your handle value.

Rate Limit Reserve

Your PDS limits how much your account can write by using a points system.

Tell me more…

A new record (scrobble) costs 3 points, an update costs 2 points, and a delete costs 1 point. All apps that write to your account use the same points. Examples are Bluesky posts and likes, and other scrobblers.

A Bluesky PDS allows 5000 points each hour and 35000 points each day for each account. Other PDS servers can use different limits. Multi-Scrobbler reads the limit from the responses of your PDS, so it works with each limit.

The rate limit reserve is the number of points that Multi-Scrobbler keeps free for your other apps. When your PDS reports that this number of points or fewer is left:

  • The Client stops scrobbling and Now Playing updates. Its state changes to Idle, and its status shows the time when it resumes. Queued Plays stay in the queue.
  • An Export to the Client waits. The Job page shows the points that are used and the point where the Export waits.
  • At the reset time of the limit, the Client and the Export start again automatically.

Set the reserve in the options of the Client configuration, or with ENV:

Option ENV Default Points to keep free when…
rateLimitReserve TEALFM_RATE_LIMIT_RESERVE 1000 the Client scrobbles
exportRateLimitReserve TEALFM_EXPORT_RATE_LIMIT_RESERVE 1000 a Job exports to the Client

On a Bluesky PDS, use a reserve of 1500 or lower.

If your PDS does not send rate limit headers, Multi-Scrobbler does not pause.

Example File or AIO Config
[
{
// ...your Client configuration
"configureAs": "client",
"data": { /* ... */ },
"options": {
"rateLimitReserve": 1000,1
"exportRateLimitReserve": 15002
}
}
]
  1. 1.Live scrobbling pauses with a generous buffer so other activities (Bluesky likes, posts, etc..) aren't interrupted.
  2. 2.Exports pause before live scrobbling.
MS Mirrors Your PDS History

ATProto-based Clients, like Teal.fm, cannot query an API to get scrobbles with timestamps in an arbitrary time range the same way most other Clients can. This prevents MS from being able to check for duplicate scrobbles downstream, “on-demand.”

Why?

Most other scrobble services allow fetching an arbitrary time range for scrobble data. MS uses this functionality to check for duplicates (in addition to checking its own databse of sent scrobbles).

However, the ATProto PDS API specification only allows querying your repository sequentially and with offsets that are not related to the timestamp of your scrobbles.

The only way search for scrobbles records at a specific time in your account is to either a) sequentially walk every page of your records through the API until we find them or b) download a full export of all data in your repository as a CAR file, parse it fully, and then search that data.

In order to compensate for this missing query functionality, the Teal.fm Client keeps a copy of your scrobbles in the Multi-Scrobbler database. This copy is a locked Mirror of your account’s scrobbles, parsed from your full account history (CAR) file.

Before the Client scrobbles, it compares the Play against the Mirror to find duplicates. You cannot clean up or delete this Mirror.

By default, the Mirror has only the scrobbles of the last 30 days. The Client copies them from your repository’s CAR file when it starts for the first time.

Older Plays
Older Plays

When the Client gets a Play that is older than the Mirror, it copies the scrobbles of that time from your repository’s CAR file. This copy is a pass. During the pass:

  • The Play stays in the queue. Its history shows that it waits for the pass.
  • The Client continues to send other Plays.
  • Other older Plays that are queued at the same time use the same pass.

After the pass, the Client compares the Play against the Mirror and sends it. Multi-Scrobbler keeps the downloaded repository for 1 hour, and other passes in that hour use it again.

Once a day, Multi-Scrobbler removes the scrobbles that are older than 30 days from the Mirror. It does not remove scrobbles that queued Plays or running Exports need.

Keeping All History

To keep all your scrobbles in the Mirror, rather than only 30 days, set keepAllHistory to true in the options of the Client configuration. With ENV, set TEALFM_KEEP_ALL_HISTORY=true.

Example File or AIO Config
[
{
// ...your Client configuration
"configureAs": "client",
"data": { /* ... */ },
"options": {
"keepAllHistory": true
}
}
]

With this option, the Client copies your full history at the next start and never removes scrobbles from the Mirror. Older Plays do not wait for a pass. The database uses more disk space, about a few hundred bytes for each scrobble.

This is a good option to enable if you are planning on Exporting scrobbles to Teal.fm that cover a large date range.

If you turn the option off, the daily cleanup removes the scrobbles that are older than 30 days. The database file does not get smaller by itself. To make it smaller, see Reclaiming Disk Space.

Sync Status

The Synced status found on the Teal.fm Client’s details page let’s you know if if your PDS History is succesfully mirrored in the database. You can manually trigger a sync of the Mirror by using the Sync Plays action in the Client menu:

  • Full Sync - reruns importing the 30 day/full scrobble history from your CAR file into the Mirror
  • Recent Sync – Uses the API to re-import the last ~100 scrobbles into the Mirror, to fill in any gaps in recent listening history

Configuration Type

This is configuration for the ENV Config Type.

Environmental Variable Type Default Description
TEALFM_ID string A globally unique ID EX myComponentId
TEALFM_NAME string Value of TEALFM_ID A vanity name EX My Cool Component
TEALFM_ENABLE boolean true Should this component be used?
TEALFM_IDENTIFIER string The fully-qualified handle, or identifier, for your Atmosphere account
TEALFM_APP_PW string The App Password you created for your Atmosphere account
TEALFM_RATE_LIMIT_RESERVE number 1000 Points of the PDS rate limit to keep free. Scrobbling waits until the limit resets when fewer points are left.
TEALFM_EXPORT_RATE_LIMIT_RESERVE number 1000 Points of the PDS rate limit to keep free when exporting from a Job. Exports wait until the limit resets when fewer points are left.
TEALFM_KEEP_ALL_HISTORY boolean false Keep every scrobble of your account in the multi-scrobbler database, instead of only the last 30 days. Older scrobbles are otherwise mirrored only when a dupe check needs them, then removed again.
TEALFM_SCROBBLE_INTERVAL number Minimum time (milliseconds) to wait between scrobbles sent to this Client

Bold/Italic = Required