Switch artist photos/bios to fanart.tv + Last.fm #39

Closed
opened 2026-03-19 14:51:01 -04:00 by connor · 0 comments
Owner

Currently using Wikipedia REST API for artist photos and bios (resolved via Wikidata when no direct Wikipedia link exists on MusicBrainz). This works but has drawbacks: Wikipedia images are often low-quality/cropped thumbnails, bios are encyclopedia-style rather than
music-focused, and the Wikidata resolution adds latency.

Proposed changes

  1. Artist images: fanart.tv
  • API: https://webservice.fanart.tv/v3/music/{musicbrainz_id}?api_key={key}
  • Returns: artistthumb, artistbackground, hdmusiclogo, musicbanner
  • Free tier: requires API key (register at fanart.tv), rate limited
  • Add fanart_api_key to config (optional — fall back to Wikipedia if not set)
  • Cache responses in search_cache with 30-day TTL
  • Use artistthumb[0].url as primary photo
  1. Artist bios: Last.fm
  1. Fallback chain:
  • Photos: fanart.tv → Wikipedia thumbnail → none
  • Bios: Last.fm → Wikipedia extract → none
  1. Config additions:
    metadata:
    fanart_api_key: null # optional, from fanart.tv
    lastfm_api_key: null # optional, from last.fm/api

Acceptance criteria

  • fanart.tv integration fetches high-quality artist images
  • Last.fm integration fetches music-focused bios
  • Both gracefully fall back to Wikipedia when API keys not configured
  • API keys configurable via config.yaml and settings page
  • Cached to avoid repeated API calls
Currently using Wikipedia REST API for artist photos and bios (resolved via Wikidata when no direct Wikipedia link exists on MusicBrainz). This works but has drawbacks: Wikipedia images are often low-quality/cropped thumbnails, bios are encyclopedia-style rather than music-focused, and the Wikidata resolution adds latency. Proposed changes 1. Artist images: fanart.tv - API: https://webservice.fanart.tv/v3/music/{musicbrainz_id}?api_key={key} - Returns: artistthumb, artistbackground, hdmusiclogo, musicbanner - Free tier: requires API key (register at fanart.tv), rate limited - Add fanart_api_key to config (optional — fall back to Wikipedia if not set) - Cache responses in search_cache with 30-day TTL - Use artistthumb[0].url as primary photo 2. Artist bios: Last.fm - API: https://ws.audioscrobbler.com/2.0/?method=artist.getinfo&mbid={mbid}&api_key={key}&format=json - Returns: artist.bio.summary (HTML) and artist.bio.content (full) - Free tier: requires API key (register at last.fm/api), 5 req/sec - Add lastfm_api_key to config (optional — fall back to Wikipedia if not set) - Strip HTML tags from bio summary for clean display - Cache responses in search_cache with 30-day TTL 3. Fallback chain: - Photos: fanart.tv → Wikipedia thumbnail → none - Bios: Last.fm → Wikipedia extract → none 4. Config additions: metadata: fanart_api_key: null # optional, from fanart.tv lastfm_api_key: null # optional, from last.fm/api Acceptance criteria - fanart.tv integration fetches high-quality artist images - Last.fm integration fetches music-focused bios - Both gracefully fall back to Wikipedia when API keys not configured - API keys configurable via config.yaml and settings page - Cached to avoid repeated API calls
connor added the LowPriority label 2026-03-19 14:52:09 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Shanty/Main#39