Shuffle all, the first tile of the Random section, plays random tracks
from getRandomSongs and fetches another batch when fewer than five are
left. Played tracks past the last fifty are dropped, so the queue stays
small. Tracks queued meanwhile play after the playing track and after
anything queued before them, ahead of the random ones. Playing anything
else ends it, and it carries on after a restart.
Holding South on a row, or shift+s on the keyboard, plays its tracks in
random order with track shuffle on, so turning shuffle off goes back to
their own order. On a song row it shuffles the page the song is on. An
artist plays every track of every album, fetched a few albums at a time.
South now acts on release, so a long press can mean something else. A
long press on a row with nothing to shuffle activates as before.
North on the now-playing screen, or s anywhere, shuffles what has not
played yet. Off goes back to the order the tracks were queued in and
carries on after the playing track. Tracks queued while shuffled go to
random positions, an album as one block under album shuffle.
The player reorders its own list under its lock and keeps a track it
already handed to playbin next, so playback stays gapless. Each reorder
bumps a queue generation that track and picture events carry, and the
app drops an event sent before the last reorder. The saved queue keeps
the original order and the mode; older files load unshuffled.
Each function returns positions in the new play order, so the queue,
the original order and the player's URLs can be reordered by the same
list. Nothing calls them yet.
Album shuffle groups tracks by album id, since the album name alone
merges different albums with the same title. Library shuffle tops up
the queue with getRandomSongs.
A track whose cover is a different picture from the album's now shows
that cover in its row instead of the track number. Pictures are compared
decoded, since Navidrome gives every track its own cover id even when it
is the album's image. The number column is as wide as the cover, so rows
with and without one line up.
Since 0.8.0 covers are cached in a directory per server. The files that
earlier versions wrote straight into the cache root were never read
again and never removed. They are now deleted once on start, in the
background; the server directories are left alone.
remus reads the controller from the device, whichever window has focus,
so presses meant for a game in front also skipped tracks and paused in
remus. It now follows winit's focus events, through slint's
unstable-winit-030 feature since Slint does not expose window activation
itself, and drops controller presses while the window is not in front.
It assumes focus until told otherwise, so a window manager that never
reports focus keeps the controller working.
Nextcloud Music gives every song of an album the album's cover id, so
tracks with their own art all showed the album cover. The player now
reads the picture embedded in each file it decodes and reports it once
per track, or reports that there is none. The now-playing art, backdrop
and palette use it, and wait for that answer so they do not show the
album cover first and then change. Lists and the queue keep the
server's cover.
Pictures are read where each file's decoder hands on its stream:
further down, a file without a picture still carries the previous
file's tags after a gapless switch.
The password field has an eye at its right end that switches the field
between masked and plain text, struck through while the text shows. From
a controller, the queue button toggles it while the field is selected,
and the hint bar says so. A keyboard types into the field, so it uses
the eye instead. It is hidden again each time the login screen opens.
config.toml now holds a list of [[server]] logins and the active one.
The single-login file of earlier versions loads as the only entry.
Settings lists the servers first: confirm switches, the queue button
pressed twice removes, and Add server opens the login form, which can
now be cancelled. Removing the last login returns to the login screen.
A switch saves the queue of the server being left, stops the player and
restores the other server's saved queue paused. Player events sent
before the stop are dropped by an epoch, and cover loads started for the
old server by a generation, so nothing of one server shows on the other.
Covers are cached on disk per server, keyed like the saved queue.
The shoulder triggers wrap around the sections, which puts Settings one
press from the first section.
Remus owns org.mpris.MediaPlayer2.remus on the session bus and serves
the root and player interfaces: play, pause, play-pause, stop, next,
previous and quit, with the playback status, track metadata, position
and volume. Desktops route media keys to the active MPRIS player, and
headphone buttons arrive as media keys, so this is how they reach remus.
Reading the headphones' input devices directly was ruled out: keyboard
type devices, AVRCP included, are root:input, and only gamepads are
opened up to the logged-in user. Seeking is not offered (CanSeek false).
The Flatpak gets --own-name for the bus name.
Settings has a Show controls bar toggle, on by default and saved as
show_hint_bar. Off, the hint bar goes from the browse and now-playing
screens and the content takes its height. The login screen keeps it,
since the controls are not known yet there and Settings is out of reach.
The bar is where the version shows, so while it is off Settings lists
the version instead.
Right stick up and down change the volume in steps of 5 and clicking it
mutes; + (or =), - and m do the same on a keyboard, on every screen. The
stick's dominant axis wins, so a diagonal push does not seek and change
the volume at once. Any step unmutes.
The level goes to playbin's volume on a cubic scale, so steps sound
even, and to its mute. A pill shows the level for a moment after each
change, the now-playing screen shows it under the times, and it is
saved in settings.toml once the changes stop and on quit.
Hint icons for the right stick and the keys are from Kenney's Input
Prompts 1.5, like the others.
The first range setting: its row draws a slider, and left and right
change it in steps of 10 while confirm still flips the toggles. Saved
as cover_backdrop in settings.toml, defaulting to the old fixed look.
Up to the default the cover fades in under the old overlay. Above it
the overlay thins as well, down to 0.55 on the left where the title and
progress sit, which kept them readable over a bright cover.
The cover turns edge-on, swaps, and turns back with an overshooting
curve. Slint has no perspective, so the turn squashes the width.
Whether to flip is decided by a hash of the decoded pixels, not by the
cover id: Navidrome gives every track its own id even when the whole
album shares one image. While the new cover loads the old one stays up,
and the next track's cover is fetched ahead so a skip decides at once.
The login screen could only be left with Ctrl+Q, which a gamepad cannot
press. Exit sits below Connect as the last focus stop and goes through
Action::Quit.
Holds org.freedesktop.ScreenSaver.Inhibit, the call Electron apps
such as VacuumTube use to stay awake in Steam's Game Mode, and the
XDG portal's idle inhibit, from play until pause, stop or quit.
zbus 6 cannot connect through Flatpak's D-Bus proxy, so this uses
zbus 5.
Quitting, a crash or SteamOS restarting the app lost the queue and how
far into the track playback was, which hurts most for long items. The
queue is now saved to queue.json in the state directory, one queue per
user and server, on a track change, on pause, when songs are queued,
every 15 seconds while playing and on quit. It holds song metadata,
never a stream URL, since those carry the token or the password.
On start the saved track is loaded paused and seeked to once it has
prerolled. Nothing plays, and the server is not told about the track,
until play is pressed. An unreadable file is logged and ignored.
Two player bugs had to go for this. A failing source posts several
errors, and the later ones counted against the next track, so one
missing song skipped two tracks or stopped the queue. Play pressed
while a track was still loading was dropped.
The hint bar always named Xbox buttons, so someone at a keyboard was
told to press buttons they did not have, and owners of other pads got
the wrong letters. Hints now name an action, and the keys or button
icons come from the input used last: keyboard, or an Xbox, PlayStation,
Switch or Steam Deck controller.
Behind Steam, every pad is Steam's virtual one. remus reads the file
Steam names in SteamVirtualGamepadInfo to find the physical controller,
matching the slot in the pad's name, as SDL does. Icons are Kenney's
Input Prompts (CC0), with the licence beside them.
The player reported a track only when the queue index changed, to drop
the repeat stream-start messages playbin posts for one track. Starting
another album at the same index (track 1 after track 1) therefore sent
no event: the app kept the old track on screen, and pause said nothing
was playing, because it had cleared the current track while waiting
for that event.
A stream-start that begins a track the player was asked to start is now
always reported. Only repeats within one track are dropped, and the app
treats every report as a new play, so replaying the current track
resets its position and scrobbles again.
The version had never moved from 0.1.0, so a build on the Deck could not
be matched to what it contains. The bump targets follow frig and
worklane: write the new version, amend it into the last commit and tag
it. Here they also add a release to the Flatpak metainfo, and refuse a
version that CHANGELOG.md, new in this commit, has no entry for.
The version is shown at the bottom left of every screen, the login
screen included.
A new Settings section in the sidebar turns it on and off. It is saved
in settings.toml, apart from the login, so logging out keeps it.
Each theme colour keeps the lightness it has in the brand palette and
only takes the cover's dominant hue, so text stays readable on any
cover. Covers with too little colour, and nothing playing, use the
brand palette. Slint cannot animate a global, so a timer in Rust fades
the Theme colours to the new palette over 800 ms.
Nextcloud Music answers a token login with Subsonic error 41, so remus
could not log in to it at all. Login now retries with the password,
hex-encoded as the spec allows, when the server returns 41, and saves
which method worked. Servers that accept tokens are unaffected, and
existing login files still load.
Server errors now keep their code. A wrong password on Nextcloud adds a
line about the API password from the Music app's settings, which is not
the Nextcloud login password.
A Flatpak cannot run the host's mpv, and SteamOS does not ship one.
GStreamer comes with the Flatpak runtime, so the player now drives
playbin in-process. The next track is handed over in about-to-finish,
which keeps playback gapless as it was with mpv. GStreamer's HTTP
errors quote the stream URL, so its query string, which carries the
auth token, is stripped before logging.
On a Steam machine remus can start before the network is up, so the
first page load fails even though the saved login is fine. An empty
page now retries with backoff (2 s doubling to 30 s) and fills in once
the server is reachable, without anyone pressing a button.
Browses a Subsonic library and plays it through mpv, driven by a
gamepad or keyboard. The UI scales from the window's physical height
rather than the compositor's scale factor, so it keeps its proportions
on a Steam Deck and on a 4K TV, where other players open small or
scale badly.