feat: spotify-only matching + optional local-LLM gate + google→bandcamp fallback (closes task/drop-musicbrainz-google-fallback, closes task/ollama-classifier)
Source: human-feedback note 01KVDYV3A35B57N15CRBQDXPCH (project/reddit-spotify-linker, 2026-06-18) — "remove the musicbrainz integration and just use spotify"; a google search for "<name> bandcamp" fallback; and "would a local llm be better able to categorise these ... include instructions for running something suitable via ollama (16GB M2)". - Remove MusicBrainz entirely (viaMusicBrainz + url-rels + rate-gate; lib relUrls/mbResult). Spotify is now the only music API; it both gates by exact-name match and supplies the direct artist link. - Optional ollama LLM gate (OLLAMA_URL enables it, OLLAMA_MODEL default qwen2.5:3b) called over plain HTTP -> stays zero npm-dep. It classifies which candidates are real artists/albums (the matching-quality lever). Pure prompt/parse logic in new llm.js (unit-tested in llm.test.js); the fetch + resolveAll gate wiring live in resolver.js. - A confirmed name links to its direct Spotify page when available, else a Google search for "<name> bandcamp". New "google" primary platform rendered by the extension (styles.css blue accent + platform-aware link title in content.js). - README: drop MusicBrainz; document the two gates + a runnable local-LLM setup for a 16GB MacBook M2. AGENTS.md: flip the old "no ML/NER" standing decision per the human override. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+13
-8
@@ -1,13 +1,18 @@
|
||||
# Copy to `.env` (it is gitignored). All values are OPTIONAL.
|
||||
# Copy to `.env` (it is gitignored).
|
||||
#
|
||||
# Without Spotify credentials the resolver validates names against MusicBrainz and links
|
||||
# to Spotify/Bandcamp SEARCH pages — works with zero setup.
|
||||
#
|
||||
# With credentials it uses the Spotify Web API for DIRECT artist links.
|
||||
# Create a (free) app at https://developer.spotify.com/dashboard to get these.
|
||||
# Spotify Web API (client-credentials) — gives DIRECT artist links and, on its own, gates
|
||||
# candidates by exact-name match (a name links only when Spotify has that artist). Create a
|
||||
# free app at https://developer.spotify.com/dashboard to get these.
|
||||
SPOTIFY_CLIENT_ID=
|
||||
SPOTIFY_CLIENT_SECRET=
|
||||
|
||||
# Port the resolver listens on (default 8787). If you change it, also update
|
||||
# RESOLVER_URL in extension/content.js and the host in extension/manifest.json.
|
||||
# Optional local LLM (via ollama) for BETTER matching — it decides which candidate substrings
|
||||
# are real artists/albums. Set OLLAMA_URL to enable it; still zero npm deps (plain HTTP).
|
||||
# Confirmed names get a direct Spotify link when available, else a Google->Bandcamp fallback.
|
||||
# ollama pull qwen2.5:3b # ~2GB, runs comfortably on a 16GB MacBook M2
|
||||
# OLLAMA_URL=http://localhost:11434
|
||||
# OLLAMA_MODEL=qwen2.5:3b
|
||||
|
||||
# Port the resolver listens on (default 8787). If you change it, also update RESOLVER_URL in
|
||||
# extension/background.js and the host in extension/manifest.json permissions.
|
||||
PORT=8787
|
||||
|
||||
Reference in New Issue
Block a user