Automation

Music Automation

Automation as it applies to albums, singles and artists

Music Automation lets RKHM build and maintain your music catalog for you. Instead of adding every artist, album and track by hand, RKHM can pull metadata from Spotify and MusicBrainz, attach playable sources from YouTube or SoundCloud, and collect similar artists from Last.fm, ListenBrainz and your own listeners for music suggestions.

Check Spotify access before configuring automation
Spotify requires the owner of a Development Mode app to have an active Premium subscription. Development Mode is intended for learning and personal, non-commercial use; it is not a general production API entitlement. Spotify has also restricted endpoints and metadata available to newer apps. Review Spotify changes and Spotify’s quota modes before planning a public music catalogue.

There are four separate mechanisms behind the feature. They are configured on the same screen, but they are triggered in completely different ways and they do different things. Reading this table first will save you a lot of confusion later.

MechanismWhat triggers itWhat it doesCan it import brand-new items?
Full AutomationA visitor opens an artist or album page, or uses your searchTalks to Spotify live and merges fresh data into the page being rendered — an artist's albums, an album's tracks, the artists credited on them — and mixes Spotify search results into your search pageYes, and more than you might expect. See the warning below
On-demand source fetchA visitor presses play on a track that has no playable sourceSearches YouTube or SoundCloud for that one track and stores the result as a new track sourceNo — it only attaches a source to a track you already have
Music CronjobsA scheduled background process on your serverWalks a list of IDs, or a filtered set of your own database rows, and creates or updates artists, albums, tracks and playlistsYes — this is the deliberate, controllable bulk import mechanism
Similar artistsA background job that runs only while Settings → Suggestions → Enabled is on. It works through the artists your signed-in listeners actually play and followAsks Last.fm and ListenBrainz which artists are similar, compares what your own listeners play, and stores a list of similar artists for each artist. Music suggestions use these listsOnly if you switch on Create missing artists. Without the Spotify Scrapper tool it adds artist rows only; with it, a created artist’s top tracks are also fetched, which can add their albums and featured artists

In short: Cronjobs grow your catalog deliberately and on a schedule you control, Full Automation grows it as a side effect of people browsing, on-demand fetch is a safety net for a track someone tries to play that has no audio attached yet, and the Similar artists job mainly feeds music suggestions.

Before you start: credentials

All automation settings live on one page: Admin area → Content → Music → Automation. The same page is also linked from Settings → Cronjob → Music - Automation. One exception: the Similar artists job also needs Settings → Suggestions → Enabled to be on. Its settings group is always shown on the Automation page, but nothing in it runs while Suggestions is off.

GroupWhat you enterNeeded for
SpotifyClient ID, Client Secret — from a developer app owned by a Spotify Premium accountEverything Spotify — Full Automation and Spotify cronjobs
YoutubeAPI Key(s), one per line, and an API region code (default US)Finding YouTube videos as track sources, both by cronjob and on demand
Youtube DownloadActiveDownloading a YouTube video and converting it to a local MP3. Requires working FFmpeg and youtube-dl, configured on Setting → General → External Tools. Read the disclaimer below before enabling
SoundcloudClient ID, Client Secret, Enable SoundCloud as Music SourceOn-demand SoundCloud source fetch
LyricsAutomated Lyrics Source, plus a Musixmatch API key or an AZLyrics proxyAutomated lyrics
Similar artistsTick Use Last.fm and enter a Last.fm API key, from last.fm/api/account/create. Use ListenBrainz needs no keySimilar artists from Last.fm and ListenBrainz, for music suggestions

MusicBrainz has no settings group and no credentials. It is free and unauthenticated, so it works out of the box.

Get Spotify credentials by creating an app at Spotify for Developers, using an account with an active Premium subscription. Get a YouTube key by enabling YouTube Data API v3 in Google Cloud. If you have installed the Spotify Multi Accounts tool, the Client ID and Secret fields on this page are replaced by a note — define your keys on that tool's own settings page instead.

About scrapper tools and youtube-dl
RKHM offers optional YouTube, SoundCloud and Spotify scraper tools, a Spotify Multi Accounts tool, and yt-dlp based downloading. Using scrapers and downloading is only legal for research purposes and personal use — don't rely on them for a public or commercial site. They are also affected by provider rate limits and changes on the provider's side. A Spotify Premium subscription alone does not grant Extended Quota Mode or permission for every commercial use.
A Spotify Premium subscription is active on the account owning your developer app
Spotify Client ID and Client Secret are both filled in — one without the other silently fails every Spotify call
At least one YouTube Data API v3 key entered, if you want YouTube sources
SoundCloud Client ID and Secret entered, if you want SoundCloud sources
If you want similar artists for music suggestions: Settings → Suggestions → Enabled is on, and a Last.fm API key is entered if you tick Use Last.fm
An OS-level scheduler is calling RKHM's cron runner — see the warning further down

Mechanism 1 — Full Automation

Enable it with Full Automation in the Spotify group. When it is on, RKHM talks to Spotify live, while a visitor is browsing, and merges what it finds into the page it is about to render.

How it works
  • When a visitor searches your site, RKHM also searches Spotify and adds closely-matching artists and albums that you do not already have into the search results. Clicking one creates it on your site.
  • When a visitor opens an artist page, RKHM re-checks that artist on Spotify and pulls their albums — and creating those albums creates the tracks and the artists credited on them.
  • When a visitor opens an album page, the same thing happens one level down: the album's tracks are pulled, and every artist credited on them is created if missing.
  • Any artist RKHM encounters in a Spotify response gets a row in your database — lead artists, featured artists, and related artists where Spotify returns them. During a page view, related artists are requested from Spotify’s official endpoint, which affected Development Mode apps cannot use (see Spotify changes). The Spotify Scrapper tool does not answer here: it only works in background cron runs.
  • It is deliberately disabled during background cron runs — it is a live, per-page-view mechanism only.
Full Automation can grow your catalog far beyond what you intended
This is the part people underestimate. Content pulls in more content through relations: one artist page pulls their albums, those albums pull their tracks, those tracks pull every featured artist, and where Spotify still returns them, related artists as well — each of whom is a new artist row that will do the same thing the next time somebody opens their page. Artists added by the Similar artists job's Create missing artists option also carry a Spotify ID, so they expand the same way. A handful of visitors browsing casually can add thousands of rows you never asked for. If you are building a curated or niche site, do not treat Full Automation as a harmless freshness feature. Use Music Cronjobs instead, where you decide exactly what enters the catalog.
When Full Automation is the wrong choice
  1. Curation: you lose control of what is in your catalog. Anything a visitor searches for, and everything related to anything they open, can end up on your site permanently.
  2. Database growth: the expansion described above is unbounded. Plan for it, or avoid it.
  3. High traffic: thousands of visitors a day means thousands of live Spotify calls, and you can reach Spotify's limits.
  4. Speed: RKHM has to wait for Spotify's servers before answering the visitor. Pre-collecting with cronjobs is always faster.
  5. Missing sources: items created this way still need an audio or video source attached, which takes extra time at exactly the wrong moment.

Mechanism 2 — On-demand source fetch

This is the quietest of the four, and the one most often misunderstood. It is controlled by two toggles: Enable YouTube as Music Source (Youtube group) and Enable SoundCloud as Music Source (Soundcloud group).

When a visitor presses play on a track that has no working source, RKHM searches YouTube or SoundCloud for that single track, and — if it finds a good match — stores it as a new source on that track so playback can start. No admin action, no cronjob, resolved inside that one request. If Youtube Download → Active is also on, RKHM can instead download the video and convert it to a local MP3.

This is not bulk automation
These two toggles are not part of Full Automation and they are not schedulable as a cronjob. They fix exactly one track, at the moment someone tries to play it, and only for tracks that entered your catalog from Spotify and currently have no playable stream. Tracks from a manual upload or from MusicBrainz-only enrichment are never touched by this path.

Two related toggles sit in the same Youtube group. Enable Replacment of Broken YouTube Videos (spelled this way on the settings page) lets the player report unavailable videos back to your server, so they can be found and replaced. Enforce 30-Day YouTube ID Storage Limit makes RKHM delete stored YouTube IDs after 30 days, to comply with YouTube's API policies.

Reporting is throttled so it cannot be abused. The limits live on Settings → Player → Report Limits, and they apply to every kind of reportable source, not only YouTube videos: Max Reports per User per Item (default 1), Max Reports per IP per Item (default 1), and Max Reports per IP per Day (default 10, counted as unique items).

Mechanism 3 — Music Cronjobs

Think of music cronjobs as diligent carriers working behind the scenes. Each one travels to Spotify, MusicBrainz or YouTube, collects what you told it to collect, and brings it back to your server without you doing anything. You control what they collect, how often, and how much per trip — which is exactly what Full Automation does not give you.

You manage them at Admin area → Content → Music → Cronjobs (also linked from Settings → Cronjob → Music - Cronjobs). Create as many as you like, each with its own purpose and its own schedule. More jobs means more API requests and more database work, so build them deliberately rather than all at once.

Anatomy of a music cronjob

FieldWhat it means
Name / CommentYour own label and notes. Visible to admins only
API NameSpotify, MusicBrainz or YouTube
Object typeArtist, Album, Track or Playlist. Which ones are available depends on the API you picked
Dynamic IDSOff = you paste the API IDs yourself. On = RKHM picks items out of your own database using filters you define
Static IDsOne API ID per line. Only shown when Dynamic IDS is off. The Browse Spotify button helps you find them
Execution intervalMinutes between runs of this job. 1 = once a minute, 60 = once an hour
Update intervalDays before an ID this job already checked becomes eligible to be checked again
Item limitHow many items to process in a single run. Higher means longer runs and more API usage
ActiveThe on/off switch for this job. Inactive jobs are never registered with the cron engine

Static IDs vs Dynamic IDs

Static means you hand the job a fixed list of API IDs, one per line. This is how you seed a catalog: pick ten artists you care about and let the job fetch them and everything attached to them. Use the Browse Spotify button next to the field — type a keyword, click a result, and its ID is added to the list for you.

Dynamic means the job looks into your own database instead, and you narrow it down with Dynamic Filter fields — the same filters you use when browsing artists, albums or tracks in the admin area. This is how you keep an existing catalog fresh, and how you enrich items you already have.

Some Dynamic Filter fields are made for automation. For tracks: Has a stored source, Has genre (matches the genre on the track, its album or its artist), Min plays, Longer than (minutes) and Shorter than (minutes). For albums: Has a stored source, Has genre and Min plays. For artists: Min plays. In a cronjob they appear as, for example, Dynamic Filter -> Track -> Has a stored source. The same filters are available in the admin lists and under Filters in PageBuilder widgets.

Two things are worth knowing about dynamic jobs. A dynamic Spotify job only picks up items that already carry a Spotify ID — it refreshes what you have, it does not discover new items. A dynamic MusicBrainz artist job with Get related artists enabled can create new artist entries as it discovers relations, which means its scope can keep expanding run after run. Those new entries are bare: a name and a MusicBrainz ID, nothing else. Watch that one.

What each API can do

APIObject typesQuery typeExtra options
SpotifyArtist, Album, Track, PlaylistStatic or DynamicGet albums, Sync genres, and for playlists Create playlists plus an owner user. Get related artists and Get top tracks only appear if the Spotify Scrapper tool is installed, because affected Development Mode apps cannot use the former official endpoints. The scrapper only answers during background cron runs, with its own switch on and a proxy set
MusicBrainzArtist, Album, TrackDynamic only — it works against rows already in your database. Always save MusicBrainz jobs with Dynamic IDS on: the form does not enforce it, and a MusicBrainz job saved with static IDs fails on every runArtist: Get related aritsts (spelled this way in the form), Get genres, Get tags. Artist lookups also store the MusicBrainz rating and vote count. Album and Track: Get genres, Get tags — on Track jobs these two options currently fill in nothing. Related artists here means relationships, not similarity — see How RKHM uses MusicBrainz below
YouTubeTrack onlyDynamic only — both are enforced, the form will refuse to save otherwiseDownload videos — also download the video and convert it to a local audio file. Make sure youtube-dl and FFmpeg work first, and read the disclaimer above

A YouTube job skips any track that already has a YouTube source, and with Download videos on it also skips tracks that already have a local audio source — so it never re-does work it has already done.

Creating a cronjob, step by step

Fill in the credentials for the API you are about to use, on the Music Automation page
Go to Content → Music → Cronjobs and click create
Give the job a name that says what it is for — 'Seed', 'Famous Checker', 'YouTube sources'
Pick the API Name and Object type
Choose Static or Dynamic, then fill in the IDs or the dynamic filters on the Query tab
Set Execution interval, Update interval and Item limit
Tick the extra options you want for that API
Save, then use the Activate button on the list screen to switch the job on
Cronjobs need a scheduler on your server
RKHM ships the cron runner but it cannot start itself. An OS-level scheduler — a cron entry on Linux, Task Scheduler on Windows — must call it periodically, for example once a minute. Until that is set up, no cronjob will ever run, music or otherwise, no matter how you configure it. Your host's control panel usually has a Cron Jobs section for this.

You can also restrict which days of the week a job is allowed to run, on Settings → Cronjob → Setting. This works for music jobs exactly as it does for RKHM's built-in ones.

Tuning: the three intervals

Execution Interval: how frequently the job runs, in minutes. 60 means up to 24 runs a day. By default jobs are executed one after another, so consider how many other jobs you have running. With Parallel execution turned on under Setting → Cronjob → Setting (added in v2.1.04), each due job starts as its own background process, up to the limit you set. If you are not sure, 10 minutes is a good baseline.

Update Interval: how current the data stays, in days. 1 means every ID is re-synced daily; 365 means annually. Frequent updates only make sense for dynamic content, like popular artists who release often. Most albums and tracks barely change, so a high number there is both more suitable and much cheaper on your API quota.

Item Limit: how many items are processed per run. Lower means fewer API requests per run. Note that one item is not one API request — a playlist can cost hundreds of requests if it contains hundreds of entries, and an artist with Get albums enabled costs far more than a bare artist lookup.

Create several cronjobs for different purposes. Set Item limit to 1 and Execution interval to 10 for all of them, then give each one a different Update interval based on how often that kind of content actually changes on the source.
General advice
Reading the stats box

The cronjob list screen shows a live Stats box for every job. Use it to judge whether a job's settings can actually keep up with the set of items you pointed it at.

  • Execution interval and Update interval — repeated back to you for quick comparison
  • Max up-to-date items — an estimate of how many items this job can realistically keep current, based on your intervals, your item limit, and how expensive that object type is to fetch
  • Query type — Static or Dynamic
  • Query item count — how many items the job's query covers in total
  • Checked item count — how many of them have been checked recently enough to still count as up to date
  • Queued for check count — how many are waiting their turn

If Queued for check count never goes down, the job is not keeping up: raise the item limit, lower the execution interval, or raise the update interval so items stay valid longer.

Worked examples

Example 1 — seeding a hip-hop catalog. Create a job called Seed. API Name: Spotify. Object type: Artist. Dynamic IDS: off. Update interval: 1. Enable Get albums and Sync genres. Use Browse Spotify to add the IDs of ten artists you care about. Each run collects those artists along with their albums and tracks.

Then add a Famous Checker: same API and object type, but Dynamic IDS on, update interval 7, with a dynamic filter that narrows the selection to the artists you most want kept current. Add a Mid Checker alongside it with an update interval of 60 and a looser filter, so your less-critical artists are still refreshed, just far less often.

Example 2 — enriching what you already have. For a Development Mode app affected by Spotify’s endpoint and metadata restrictions, use MusicBrainz to enrich existing artists with genres and tags. Create a job with API Name: MusicBrainz, Object type: Artist, Dynamic IDS on, update interval 14, and enable Get genres and Get tags. It will walk your existing artists and fill in the metadata Spotify used to provide. Add Get related artists only if you are comfortable with the job creating new artist entries as it discovers relations. Keep in mind that MusicBrainz related artists are band members, collaborators and similar relationships, not artists that sound alike; each one costs an extra MusicBrainz request; and missing ones are created as bare entries with only a name and a MusicBrainz ID. For artists that sound alike, see Mechanism 4 below.

Example 3 — attaching playable sources. Create a job with API Name: YouTube, Object type: Track, Dynamic IDS on (both are required). Give it a high update interval — an already-attached source does not need re-collecting. Use the dynamic filters to narrow it to the tracks you actually want playable — for example, tracks with no stored source and at least one play, using Has a stored source and Min plays — especially if you enable Download videos, so you are not downloading and converting your entire catalog.

Mechanism 4 — Similar artists

This job collects “sounds like” information for music suggestions, which are currently in beta — see Music suggestions. It runs in the background as Music Plugin - Similar artists, and it is registered only while Settings → Suggestions → Enabled is on (off by default). Its settings group, Similar artists, sits on the Automation page and is always visible, even while Suggestions is off and nothing runs.

What a run does
  1. Records early skips: when a signed-in listener leaves a track after 2–29 seconds, it is noted for suggestions. These records are kept for 180 days.
  2. Compares what your own listeners play (Use this site's listeners). This makes no outside call, and it does at most one full pass a day.
  3. Asks Last.fm and ListenBrainz, in whatever time is left of Max seconds per run.
Which artists it works on

Only artists people actually use. An artist’s demand is its plays among your site’s last 20,000 recorded listener actions, plus three for each follow among the last 2,000 follows; the most played go first. Only plays by signed-in listeners count. An artist is due when it has never been checked, or when its last check is older than Refresh after.

What it stores
  • Up to 30 similar artists per source — Last.fm, ListenBrainz and your own listeners — for each artist. A new answer replaces that source’s previous list.
  • Answers are matched to artists in your catalog by MusicBrainz ID first, then by name.
  • MusicBrainz IDs for your artists, where they can be filled in safely — see How RKHM uses MusicBrainz below.
  • New artists, only if Create missing artists is on — see below.

The lists are used by the suggestion shelves Recommended for you, Because you listened to and Artists you might like, and by More like this in the get-started picker. See Music suggestions.

What the Similar artists job does not do
It does not change the Related artists section on artist pages; that section only shows related artists from Spotify and MusicBrainz. It does not change normal endless play, which continues with the same artist, then the same genre, then random tracks. The one exception: when playback starts from a suggestion shelf (the For you tab or a Suggestion widget), the queue continues with that listener's other suggested tracks. And nothing runs while Suggestions is off.

Settings

Found in the Similar artists group on Admin area → Content → Music → Automation.

SettingDefault (range)Notes
Use Last.fmOffTip: “The free Last.fm API is for non-commercial use only. Commercial sites need an agreement with Last.fm. Last.fm also asks for a credit (shown on the For you tab), allows up to 100 MB of stored data and requires deleting it when your agreement ends”
Last.fm API keyEmptyGet one at last.fm/api/account/create
Hide Last.fm creditOffHides the “Powered by AudioScrobbler” credit on the For you tab. The credit is only shown on the For you tab
Delete Last.fm dataAn action, not a stored settingWhen you save with it selected, RKHM deletes the similar-artist lists that came from Last.fm, resets when each artist was last checked on Last.fm, and deletes saved Last.fm responses. It does not remove MusicBrainz IDs copied from Last.fm answers, or artists created from Last.fm matches
Use ListenBrainzOffNo key needed. Tip: “If a name matches several artists, it is skipped. MusicBrainz asks commercial sites to become a supporter. ListenBrainz offers this through its test (labs) API, so it may change”
ListenBrainz algorithmEmptyEmpty uses session_based_days_7500_session_300_contribution_5_threshold_10_limit_100_filter_True_skip_30. An invalid value falls back to this default
Run every (minutes)30 (5–1440)
Artists per run30 (1–1000)Most played artists go first
Max seconds per run40 (5–600)
Refresh after (days)90 (1–3650)How old a check must be before the artist is due again
Create missing artistsOffExact name matches only. Requires Spotify Full Automation — see below
Missing artists to check per artist10 (1–50)
Max new artists per run5 (1–100)
Use this site's listenersOnCompares what your signed-in listeners play, follow and like. No outside service is contacted
Minimum shared listeners3 (2–1000)
Plays to look at200,000 (1,000–5,000,000)
Keep API responsesOffTip: saved Last.fm data counts toward the 100 MB, about 40 KB per artist. Saved responses are kept only as long as Refresh after, and the job does not ask about the same artist again before then anyway
How each source decides
  • Your own listeners: an artist needs at least 5 listeners. A listener counts for an artist with at least 2 plays, a follow or a liked track. Disliked artists are left out, and at most 30 artists count per listener. Two artists only count as similar when they share listeners at least 1.5 times more often than chance would give. Results are recomputed every 7 days.
  • Last.fm: asked with name autocorrection, at most 4 requests per second. An artist Last.fm does not know is skipped until Refresh after has passed.
  • ListenBrainz: at most 1 request per second. It needs the artist’s MusicBrainz ID, which RKHM looks up first; an artist without a clear MusicBrainz match is skipped.
When a source fails

Any error, even a brief network problem, stops that source for the rest of the run. The run log says so, for example Checked 1 of 30 due artists, lastfm stopped (network). An admin notification, Similar artists source stopped, is sent at most once every six hours per source: for Last.fm when the key is missing, wrong or suspended, or the rate limit is hit; for ListenBrainz for anything except a temporary error. Its email, Telegram and WhatsApp channels are switched on by default.

Create missing artists

When a similar artist is not in your catalog, RKHM can add it through Spotify. This only works while Full Automation is on, Spotify is not rate-limited and your Spotify credentials work. RKHM searches Spotify for the name, looks at the first five results, and takes the first one whose name matches exactly. Without the Spotify Scrapper tool, it adds artist rows only. With it, a created artist’s top tracks are also fetched, which can add their albums and featured artists, so your catalog can grow by more than Max new artists per run. Tracks of these artists only become playable with YouTube or SoundCloud automation.

Created artists can expand later
Each artist created this way carries a Spotify ID, so when somebody opens its page, Full Automation pulls in its albums, tracks and featured artists like any other. Keep Max new artists per run low, and read the Full Automation warning above before switching this on.

How RKHM uses MusicBrainz

MusicBrainz is free and needs no key. RKHM uses it in three ways.

  1. Music Cronjobs. A MusicBrainz job looks up items you already have and adds genres and tags, and for artists also their related artists and the MusicBrainz rating and vote count. To find an item’s MusicBrainz ID, the job takes the first search result for the name without checking it. An artist with a common name can therefore be matched to the wrong MusicBrainz artist, and then get the wrong genres, tags and related artists.
  2. Finding IDs for ListenBrainz. ListenBrainz needs a MusicBrainz ID, so the Similar artists job looks it up first, strictly: only exact name matches count; if several match, the best one must be clearly ahead, otherwise the artist is skipped until Refresh after; and an ID that another of your artists already has is rejected. The ID is only written when the artist has none. An artist that already has a MusicBrainz ID is used as it is, including an ID from a cronjob. A lookup that fails is tried again on the next run.
  3. IDs from Last.fm and ListenBrainz answers. When a similar artist comes back with a MusicBrainz ID and matches one of your artists by name, that artist gets the ID, if it has none yet and no other artist of yours has it.

MusicBrainz related artists are relationships, such as band members and collaborations, not artists that sound alike. They are stored as the same kind of relation as Spotify’s related artists, so they appear in the Related artists section of the artist page. Spotify and MusicBrainz replace each other’s list: whichever refreshed the artist last decides what that section shows. Related artists missing from your catalog are created as bare entries with only a name and a MusicBrainz ID, and no Spotify ID.

Speed and errors
  • About one request per second, by design.
  • When MusicBrainz answers that it is busy (HTTP 503), RKHM retries at most twice, one second apart, then gives up on that item. In a cronjob, the item still counts as checked in the run’s ‘Checked N item(s)’, and waits for the next Update interval.
  • MusicBrainz answers are kept for 72 hours, whatever Keep API responses is set to.

Collecting sources

Metadata alone is not enough — an item also needs something with sound. RKHM supports three ways to get there.

  1. YouTube video: found either in the background by a YouTube cronjob, or on demand at the moment a visitor presses play.
  2. SoundCloud audio: fetched per visitor request only. There is no scheduled SoundCloud import — see the limits section below.
  3. YouTube video converted to MP3 (youtube-dl): available both on demand and via a cronjob. Because downloading and converting takes real time, cronjobs are strongly preferred so nobody waits — and use dynamic filters so you do not convert your entire catalog. Note the disclaimer near the top of this article before you enable it.

For YouTube and SoundCloud either approach is fine — once the ID is found it is stored, and no further API requests are made for that item. For youtube-dl, use cronjobs. And always give source-collecting cronjobs a large update interval: there is no reason to re-collect a source you already have.

Housekeeping jobs

Some background jobs are registered automatically — you do not create these on the Cronjobs screen. For the first two, you just switch the setting on.

  • Enforce 30-Day YouTube ID Storage Limit adds a daily job that deletes stored YouTube sources older than 30 days.
  • Delete singles after EP release adds a daily job that looks for albums with the same title and artist, and where it finds exactly one studio album plus one or more singles, removes the duplicate singles.
  • Music Plugin - Popularity and play counts is always on. It is checked every 60 minutes but does one full pass a day, in chunks. Later checks that day appear in the run logs as skipped, with ‘Already up to date today’.
  • Music Plugin - Similar artists only runs while Settings → Suggestions → Enabled is on — see Mechanism 4 above.
Popularity and play counts

Every play, including plays by guests, updates the last-played time of the track, its album and its artist, and adds one to the album’s and the artist’s play counts. Once a day the job recalculates from the tracks: an album’s plays are the sum of its tracks’ plays; an artist’s plays are the sum of its tracks’ plays, and its likes are its tracks’ likes plus its albums’ likes. It also calculates Popularity:

ItemPopularity
Track10 × plays + 50 × likes + 30 × playlist adds + Spotify popularity
Album10 × plays + 50 × (album likes + track likes) + Spotify popularity
Artist10 × plays + 50 × likes + 100 × followers + Spotify popularity

Popularity can be picked in the Sort by option of PageBuilder widgets, and it is offered as Popularity on the public Browse page. If you saved Settings → Interface → Browsing pages before this update, tick Popularity in the filter: sort by values field of each browsable object there, or it will not appear on the public Browse page. The daily pass also stores the totals shown in the Content sources panel (see Monitoring).

If your music is already on your own disk rather than on a third-party service, none of the above applies — you want the Bulk Importer tool instead. Its Music Bulk Import job scans an upload folder, reads each audio file's ID3 tags (title, album, album artist, featured artists, embedded cover art) and creates the matching artists, albums and tracks for you. It is a one-directional import of files you already have, not a sync with an external API. See Bulk Importer for the details.

Monitoring

  • Settings → Cronjob → Run logs is the main screen. Each row shows the status, start and end time, and a detail message — either the job's own summary such as 'Checked 12 item(s)', or the error that stopped it.
  • Every active music cronjob has a Logs button on the list screen that opens the run logs already filtered to that job.
  • Finer per-step progress lines are recorded during each run, which is where you see individual lookups and failures.
  • The admin dashboard shows a Music Cronjobs card with the total number of jobs configured.
  • Error logs in the admin area will show you whether you have hit an API limit.
  • The Music page in the Stats section of the admin sidebar (Stats → Music) ends with a Content sources panel, with the columns Status, This period, Total, Last activity and What it does. It has a row for Uploads; Spotify (Full Automation on or off, or rate-limited until a given time); each cronjob API, such as MusicBrainz cron jobs; YouTube and SoundCloud; Last.fm, ListenBrainz and Your listeners; and Create missing artists. Last.fm, ListenBrainz and Your listeners show Off, On but Suggestions is off, No API key, Stopped (with the time and the last error) or On. Create missing artists warns you when Full Automation is off. A Stopped status stays until that source next succeeds, even after a short network error. Totals appear after the daily Popularity and play counts job has run once.
  • The Similar artists source stopped notification tells you when Last.fm or ListenBrainz has stopped — see Mechanism 4 above.
On-demand fetch failures do not appear in the run logs
The on-demand source fetch is not a cronjob, so it writes nothing to the run logs. If a visitor's play attempt fails to find a YouTube or SoundCloud match, there is no admin screen showing it — the only visible symptom is that the track stays unplayable. If you rely on that mechanism, spot-check playback yourself rather than waiting for a log entry.

Limits and constraints

SourceWhat to watch for
SpotifyDevelopment Mode requires the app owner to have Premium. Extended Quota Mode has separate access rules. Both Client ID and Client Secret are required; with only one filled in, every call fails and your jobs log a generic no-record error rather than a clear 'missing credentials' message. Endpoint availability depends on your app's quota mode — see Spotify changes
MusicBrainzFree and needs no key, but deliberately throttled to about one request per second. When it answers that it is busy (HTTP 503), RKHM retries at most twice, then gives up on that item until the next Update interval. It is slow by design: a high item limit on a MusicBrainz job makes for very long runs
YouTubeThe quota is strict. You can request a higher one from Google or enter several API keys, one per line — RKHM picks one at random per request. Note that RKHM does not detect an exhausted key and skip it
SoundCloudOn-demand only. SoundCloud cannot be selected as the API for a music cronjob, so there is no scheduled or bulk SoundCloud import — only per-play fetching and manual uploads
Last.fmNeeds an API key. The free API is for non-commercial use only; commercial sites need an agreement with Last.fm. Last.fm also asks for a credit (shown on the For you tab only), allows up to 100 MB of stored data, and requires deleting it when your agreement ends — use Delete Last.fm data. Any error stops Last.fm for the rest of that run
ListenBrainzNo key. RKHM uses ListenBrainz’s test (labs) API, so it may change. MusicBrainz asks commercial sites to become a supporter. At most one request per second, and only artists with a clear MusicBrainz match are looked up
Long-running jobsIf a run hangs — usually on a slow external API — its lock is held for up to six hours before the cron engine frees it, and that job will not run again in the meantime. Keep item limits modest on slow sources

Check the current Spotify, YouTube, SoundCloud, Last.fm, ListenBrainz and MusicBrainz terms, including permissions for API access, scraping, downloads, stored data and attribution, before using these integrations in a public app. Access credentials and source links do not by themselves grant rights to redistribute content.