v0.2.0
·
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 liveTracklistState(tracks,can_edit_tracks),
fed by theplayer.tracklist.updatedSSE event and eagerly fetched at connect
and after every reconnect resync.Player.tracks,Player.can_edit_tracksand
Player.current_track(the entry matching the currentmpris:trackid) read
straight from it.- Tracklist commands —
Player.go_to(),Player.add_track(uri, after_track=..., set_as_current=...)andPlayer.remove_track(), each taking
either aTrackor a raw track id. Trackmodel — the MPRIS track object path plus flattened metadata, with
the sametitle/artist/album/art_url/durationaccessors 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.TRACKLISTchange key — subscribe viaodio.players.on_change()alongside
added/updated/removed/positionto react to queue changes.- REST layer —
OdioClient.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