From fd3ce8ba6ec1ea1781181b02eef44fb457a7fc15 Mon Sep 17 00:00:00 2001 From: BoulderBadgeDad Date: Tue, 9 Jun 2026 12:27:44 -0700 Subject: [PATCH] Settings: add "Use Spotify Free for background enrichment" toggle MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit User-facing opt-in for metadata.spotify_free_enrichment (the engine landed in 38461295). A checkbox in the Metadata Source frame, independent of the primary- source dropdown, so a user with an official Spotify account connected can choose to run the bulk enrichment worker on the no-creds Spotify Free source — sparing their official API quota / dodging rate-limit bans for interactive search + sync. Help text notes the trade-off (no artist genres from Free). Default off. Wiring mirrors the existing spotify_free setting: saved in the metadata payload, loaded into the checkbox, persisted via the generic metadata.* config loop (no backend change). Auto-save already covers checkboxes in #settings-page. --- webui/index.html | 9 +++++++++ webui/static/settings.js | 7 ++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/webui/index.html b/webui/index.html index 218ed21a..066ae278 100644 --- a/webui/index.html +++ b/webui/index.html @@ -3855,6 +3855,15 @@ • Discogs — needs a personal access token.

Tip: if you pick Spotify Free and later connect a real Spotify account, it uses the official account normally and only falls back to free while Spotify is rate-limited — then switches back automatically. +
+ +
+
Runs the background enrichment worker on the no-credentials Spotify Free source even when your Spotify account is connected — sparing your official API quota (and avoiding rate-limit bans) for interactive search and playlist sync, since bulk enrichment is what usually trips Spotify's limits. Needs the bundled Spotify Free package. Trade-off: Spotify Free can't provide artist genres. Leave off to enrich via your official account as usual.
+
+
diff --git a/webui/static/settings.js b/webui/static/settings.js index f0defa8f..d9d1e33c 100644 --- a/webui/static/settings.js +++ b/webui/static/settings.js @@ -1061,6 +1061,8 @@ async function loadSettingsData() { const _metaSel = (_fbSrc === 'spotify' && settings.metadata?.spotify_free === true) ? 'spotify_free' : _fbSrc; document.getElementById('metadata-fallback-source').value = _metaSel; + const _efEl = document.getElementById('metadata-spotify-free-enrichment'); + if (_efEl) _efEl.checked = settings.metadata?.spotify_free_enrichment === true; // Populate Hydrabase settings const hbConfig = settings.hydrabase || {}; @@ -2886,7 +2888,10 @@ async function saveSettings(quiet = false) { // 'Spotify Free' is stored as the spotify source + a flag, so all // downstream 'spotify' routing is unchanged. fallback_source: metadataSource === 'spotify_free' ? 'spotify' : metadataSource, - spotify_free: metadataSource === 'spotify_free' + spotify_free: metadataSource === 'spotify_free', + // Independent opt-in: run the enrichment worker on Spotify Free even + // when an official account is connected (spares the official quota). + spotify_free_enrichment: document.getElementById('metadata-spotify-free-enrichment')?.checked || false }, hydrabase: { url: document.getElementById('hydrabase-url').value,