You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
New features
Genre Breakdown, Spotify-verified: filter Last.fm's community tags down to Spotify's own genre vocabulary (SPOTIFY_GENRE_SEEDS) when Spotify credentials are configured, so tags that are really artist names, list titles, or one-off scrobbler noise don't show up as genres. Common near-duplicate spellings (Rnb/R&B, Dnb/Drum N Bass/Drum & Bass) are collapsed onto one canonical entry.
Genre Breakdown, less noisy: a "Show: all / above 1% / 2% / 5%" dropdown hides small legend rows (the bar itself stays untouched) so a full genre scan doesn't make the page too long. The selected threshold persists as you switch periods.
Before They Were Famous, verified: each candidate is checked against Spotify's own artist search before being included, filtering out soundtrack/compilation scrobbles where the "artist" field is really an album or production title (e.g. "Monster High the Movie"). Spotify's Client Credentials auth was extracted into a shared lib/Spotify.php, reused by both this and the existing quick-listen links.
Multi-artist credit filtering: Before They Were Famous and Obscurity Index now both filter out multi-artist scrobble credits ("Artist A, Artist B & Artist C"), which Last.fm otherwise treats as one low-listener "artist" — a source of false "obscure find" results.
YouTube quota protection: a local 24-hour call counter (youtube_daily_limit, default 100) caps live YouTube API lookups so quick-listen links can't exceed the free quota; excess lookups fall back to the search link.
Distance Listened, at a glance: each comparison (flights, marathons, Moon/Mars trips, etc.) now shows a progress bar for the fractional remainder — e.g. "~74 flights, 64%" — instead of a bare decimal count.
BPM Average, visualized: replaced the plain pulsing dot with an animated ECG-style heart-monitor trace, scrolling at the real average-BPM's beat interval.
Fixes
ListenLinks caching bug: a failed Spotify/YouTube request (auth hiccup, network error) was being cached as a permanent "no match" for 30 days — indistinguishable from a genuine miss. Now only a completed API response gets cached, so a transient failure retries fresh next time instead of freezing a track's button on "Search" for a month.