Covers and artist photos with fallbacks, tag IDs first

Covers come from the release in the player's own tags (Cover Art
Archive), then ListenBrainz's match, the release group, Deezer and
iTunes. Deezer and iTunes results count only when the artist and title
match. Artist photos come from Deezer, then MusicBrainz/Wikimedia.
Missing album names are looked up on Deezer. Play counts and Who Knows
match by MusicBrainz ID before names.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
astar76 2026-12-01 15:44:39 -06:00
commit ef26f7ff12
2 changed files with 356 additions and 75 deletions

View file

@ -12,3 +12,4 @@
- D-008 — 2026-11-12 — Adds to D-007 (owner reference `assets/reference/speechbubble-bsm.gif`, BSM-bot style): the bubble is a wide white ellipse with a black outline hanging off the edge, its tail pointing into the picture, the picture's edge clipped to the bubble's curve. Options on `/speechbubble`: `position` top|bottom (bubble hangs off that edge, tail points inward), `flip` (mirrors the tail to the other side), `solid` (white fill; without it the bubble is cut out transparent where the format allows). Inputs and outputs cover many media types: PNG, JPG, WebP (still and animated), GIF and video (MP4/WebM/MOV); animated input stays animated (every frame gets the bubble), video comes back as GIF or video in the same format. `/caption` takes the same input types. Both are also `D!speechbubble` / `D!caption`. — Owner reference, 2026-11-12. — 02 Image commands.
- D-009 — 2026-11-12 — The Assyst-style output described in D-007 (transparent cutout, no outline, tail toward the right) is saved as `assets/reference/speechbubble-assyst.gif`, next to the BSM-style `speechbubble-bsm.gif` (D-008). Compare the drawn bubbles against both. — Owner request. — 02 Image commands.
- D-010 — 2026-12-01 — The fm commands read ListenBrainz (free, no key) instead of the Last.fm API, which needs Pro for everything but scrobbling from 2026-12-01. Same commands and cards; links are stored separately in `data/listenbrainz.json` (`data/lastfm.json` is kept, untouched); song links still go to the Last.fm website (free, and the Listen button reads them). Lyrics song search uses Deezer (popularity-ranked, no key). The Last.fm version is the git tag `lastfm-api-backup`. — Owner request. — all fm commands.
- D-011 — 2026-12-01 — Covers come from a chain (`src/commands/lastfm/covers.rs`): the release ID in the player's own tags (Cover Art Archive) → ListenBrainz's match → the release group → Deezer → iTunes; Deezer/iTunes results count only when artist and title match. Artist photos: Deezer → MusicBrainz/Wikimedia. Play counts match by MusicBrainz ID before names. — MusicBrainz art alone left many covers blank; owner asked for the most reliable sources with fallbacks. — fm commands.

View file

@ -9,5 +9,10 @@ One entry per session, newest last, ≤ 15 lines: done, verified how, not done,
- Not done: not tested in Discord 🧑; not deployed. Everyone must link again (`/fm mode:link`), ListenBrainz names can differ from Last.fm ones.
- Differences: periods are ListenBrainz's (last week/month/quarter/half-year, this year), not rolling; stats update about once a day; Who Knows and "plays of this track" only see each person's all-time top 1000.
## 2026-12-01 — covers and artist photos with fallbacks (owner request)
- Done: `covers.rs` (cover chain, artist photos, missing album names via Deezer); listens keep the player's tag IDs (`mbids`), tags win over ListenBrainz's guess; play counts and Who Knows match by ID first. Every card, chart and Pixel Jumble uses it.
- Verified: `cargo test` (same 8 worktree-only asset failures); `cargo test covers_live -- --ignored` and `listenbrainz_live` pass.
- Not done: not deployed at commit time; not checked in Discord 🧑.
## Later
- (none yet)