Skip to content

feat: Last.fm scrobbling support #40

@gitcoder89431

Description

@gitcoder89431

Feature

Scrobble now-playing and listened tracks to Last.fm so users get listening history, stats, and recommendations from their existing Last.fm account.

Why

Last.fm scrobbling is a low-effort, high-goodwill feature. A significant portion of audiophile terminal users already use Last.fm and will adopt any player that supports it. It requires no UI changes — just a background POST when a track starts and completes.

API

Last.fm has a free, stable API:

  • track.updateNowPlaying — call when playback starts
  • track.scrobble — call when >50% of track duration has elapsed
  • Auth: one-time auth.getMobileSession with username + password MD5 hash, store session key in config

Implementation sketch

  1. Add [lastfm] section to future config file (see enhancement: add get_now_playing, remove_from_playlist MCP tools + config file support #38):
    [lastfm]
    api_key    = "..."
    api_secret = "..."
    session_key = "..."  # obtained once via auth flow
  2. In nowPlayingTick, when a new track is detected: call updateNowPlaying
  3. When timePos / duration > 0.5 on a new track: call scrobble
  4. Fire-and-forget goroutine — scrobble errors should never affect playback

Notes

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions