Skip to content

v0.2.0

Choose a tag to compare

@github-actions github-actions released this 28 Jul 18:01
· 3 commits to main since this release
Immutable release. Only release title and notes can be modified.

Highlights

MPRIS tracklist support. Players implementing the MPRIS TrackList interface now expose their queue as live hub state — the tracks, the current entry, and the commands that edit them — kept fresh over SSE like every other domain.

Tracklists need go-odio-api v0.16.1 or later. Older servers keep working unchanged: tracklist_supported stays False, the tracklist fetch failure is swallowed, and no tracklist event is ever emitted.

✨ Features

  • Player.tracklist — a live TracklistState (tracks, can_edit_tracks),
    fed by the player.tracklist.updated SSE event and eagerly fetched at connect
    and after every reconnect resync. Player.tracks, Player.can_edit_tracks and
    Player.current_track (the entry matching the current mpris:trackid) read
    straight from it.
  • Tracklist commandsPlayer.go_to(), Player.add_track(uri, after_track=..., set_as_current=...) and Player.remove_track(), each taking
    either a Track or a raw track id.
  • Track model — the MPRIS track object path plus flattened metadata, with
    the same title / artist / album / art_url / duration accessors as
    PlayerState.
  • PlayerState.tracklist_supported — whether the player implements the
    TrackList interface, so consumers can gate their UI without probing. A
    tracklist event flips it on even if the initial snapshot predated support.
  • TRACKLIST change key — subscribe via odio.players.on_change() alongside
    added / updated / removed / position to react to queue changes.
  • REST layerOdioClient.get_player_tracklist(),
    player_tracklist_goto(), player_tracklist_add() and
    player_tracklist_remove(), one per odio-api tracklist endpoint.

🧹 Internal

  • Tests — tracklist parsing, the four REST calls, and the hub's SSE, resync
    and failure paths are exercised against the in-memory fake odio-api server.
  • Docs — the README quick start and hub reference cover the tracklist
    surface.

Full Changelog: v0.1.0...v0.2.0