Repository navigation
Refrain v0.5.6
Added
- The songs in both lists can be reached without a mouse. The rows in
Recently played and in the Status window answered to the pointer
only, so opening a song needed one — and Remove from history could
not be reached at all. Tab now walks the rows and Enter opens the song;
in Recently played the list scrolls to the row you reach and the menu
key gives the same menu as a right-click. The row the keyboard sits on
is marked, a screen reader is told its title and artist, and a track
change leaves the keyboard on the same song — including the song that
was playing, whose row is rebuilt when it stops being the current one. - The links Refrain shows can be reached without a mouse. The ones in
the legal notice, in the first-run wizard, under Settings → Last.fm
and in the banner that points at a crash report answered to the pointer
only. Tab reaches them now and Enter opens them. - Developer mode can drop the waits before a song counts as paused or
gone. Those waits keep the windows, the recently played list, the
scrobbler and the Discord card from flickering, and also make them
tedious to work on: every change takes seconds to show. With developer
mode on,grace_waits = falseinconfig.tomlskips them. Both
switches have to be set, so a setting left behind cannot reach a normal
run.
Changed
- PySide6 6.6.1 is now the oldest version Refrain runs on, up from
6.6. Refrain's one-shot timers are tied to the object they belong
to, so they can no longer fire into something that has already been
taken apart, and that form of the call exists only from 6.6.1 on. On
6.6.0 quitting would have ended in aTypeError. Distributions carry
far newer versions; this only matters if you pinned 6.6.0 by hand. - One User-Agent for every request. The line Refrain sends with each
request to Last.fm, iTunes, GitHub and Discord was spelled out in three
modules and assembled in a fourth, so the four could drift apart. It now
lives next to the version number and names the project address rather
than the repository. - The AUR packages no longer suggest
libnotify. Notifications fall
back to the desktop's notification service over D-Bus when the
notify-sendcommand it provides is missing, so the optional dependency
promised something Refrain does not need.
Fixed
-
Privacy "Off" keeps Refrain away from Discord again. It still hid
the status, as it always has, but it no longer kept Refrain from
opening a connection to Discord at all — new in this release, and not
what the setting promises. Nothing was ever shared, and the Status
window said "Off" throughout. Refrain now stays away entirely. -
The last song leaves your Discord profile when you quit, even if
Discord is slow to answer. Quitting sends Discord a last "nothing is
playing". If Discord took its time, Refrain stopped waiting and closed
anyway, and the song stayed on the profile. It now waits as long as
that message may take — but only while actually connected, so quitting
is as quick as before otherwise. -
The hint for an empty history pointed at a tab that doesn't exist.
With Recently played turned off, the window said to turn it on under
Settings → History — the tab is called Recently played. In all 15
translations too. -
Firefox is no longer told to install Plasma Browser Integration, or
to use Firefox. When a browser played something Refrain couldn't
place, the Status window always gave the same advice — install Plasma
Browser Integration or switch to Firefox. That advice is for Chromium,
which doesn't say which page is playing; Firefox, Zen, LibreWolf and
Floorp do say it. They now get a hint that fits: Refrain recognises
Apple Music by the page address, so the thing to check is whether the
Apple Music tab is the one playing. -
Quitting no longer crashes while a window is being drawn. A
SIGTERM, or Ctrl+C, took Refrain down from inside Python's signal
handler, which runs at any point in the code — including inside an
event the Wayland plugin is still holding a window for. The window
went away under the frame that was about to read it again, and the
process died with a segmentation fault. The quit now goes through the
event loop, so it waits for the event being delivered to finish. -
The Status window shows the cover again with Recently played off.
The image only reaches the cache the window reads from once a song
makes the history, so turning the history off left the window on the
placeholder for every song. It now also takes the file the cover
fetcher is still holding. -
A notification no longer shares a D-Bus connection across threads.
Wherenotify-sendis missing — which is how the AUR packages stopped
needinglibnotify— Refrain asks the notification service itself, and
did so over the connection the exported MPRIS player is dispatched on,
from a different thread. Two threads on one dbus-glib connection
corrupt the heap. It opens its own connection now, as the sources do. -
A Bluetooth device that stops answering holds Refrain up for
seconds rather than minutes. None of the BlueZ calls carried a
timeout, so each could wait out dbus-python's 25-second default on the
thread that also serves the tray, Discord and the controls — five of
them in one poll, against a poll that runs every half second. Two
seconds each is the limit now. -
Repaints nobody will see are thrown away as Refrain quits. One
still queued for a window was delivered as the event loop wound down,
and Qt's Wayland client then read through a null pointer, which can
take Refrain down on its way out
(QTBUG-150645).
The fault is Qt's, and this clears the queue rather than the fault. -
The warning sign in the tray no longer comes and goes while Discord is
starting up. Refrain talked to Discord inside the same poll that follows
the music, so it could only ever allow the handshake three seconds before
giving up — longer, and the poll would have stalled with it. Discord
regularly takes five to ten. Discord is now served from a thread of its
own, where waiting costs nothing, and the handshake may take fifteen
seconds. When a connection does take several tries, the log says how long
it stood and how many; a failure that timed out says so by name instead of
ending in a colon. -
A paused song no longer disappears from Discord. Pausing cleared the
card entirely, so taking one headphone out — which pauses the music and
resumes it when you put it back — made it come and go each time. The card
now stays and says Paused in front of the artist, and the timer counts
the pause from zero — Discord has no clock that stands still, so the song's
own position would only crawl on past its length. A song reported as paused
on the way from one track to the next is not labelled, and a song the player
stops naming, or one left paused for half an hour, still takes the card
with it. -
A song is no longer lost from Last.fm when its source goes quiet for a
moment. A tab reloading its metadata reports no song for a poll or two,
which ended the play and restarted the count from zero: 190 seconds of a
200-second song earned nothing. The scrobbler now bridges such a gap for
the ten seconds Recently played already allowed, which is also what keeps
the two agreeing about what was heard. -
Uninstalling no longer claims to have cleared the keyring when it
could not. With the keyring locked, the deletion failed and the message
said the Last.fm credentials were gone anyway. It now reports what
actually happened and says what to do about it. -
Turning the history off now also removes a damaged history file. A
file that could not be read was set aside next to the original and kept
the songs it still held, although the switch promises nothing is kept. -
A Bluetooth device between apps no longer hides a paused song. Such a
device reports itself as playing with no metadata at all, and a playing
source outranks a paused one — so an Apple Music tab paused mid-song
disappeared from the tray and the Status window in favour of nothing.
The rule that a reading without a song is not playing now covers both
sources. -
The right-click menu in Recently played no longer dies under itself.
The list is rebuilt on every change to the history — a pause, the scrobble
mark, the next song — and the menu belonged to the row that was thrown
away, so Open in Apple Music could reach for a window that no longer
existed. -
An Apple Music tab with nothing loaded no longer counts as playing.
Left open on the home page, the tab keeps a media session alive and the
browser reports it as playing — the state comes from the looping artwork
video, so the position even runs backwards. Refrain knew the page title
was not a song but kept the "playing" that came with it: a green tray
icon, a published MPRIS player telling the desktop a song was on, and
advice to install the very browser integration that was reporting. -
A missing system tray is also said in a notification. Refrain
showed a dialog with what to install, but a desktop that has no tray
may not raise a parentless dialog either, and then Refrain simply
disappeared when started from the menu. The same reason now goes out
as a desktop notification as well, in all 16 languages.
Security
- Every request now goes through the same opener, which refuses to
follow a redirect from HTTPS to plain HTTP. Only the update check and
the AppImage download did so before; the Last.fm calls, the cover
lookups, the Discord application lookup and the first-run probe
followed such a redirect and would have carried their answer, and what
they sent with it, in the clear. - The owner's signature now covers the wheel and the source
distribution too, along with the zsync file and the third-party
notices —SHA256SUMSlisted only the AppImage and the SBOMs. The job
that uploads to PyPI checks both against it before publishing, so an
asset replaced between the signing and the release cannot reach PyPI,
where an upload cannot be taken back. - An answer that only trickles in no longer holds a worker forever.
The timeout on a request bounded each read on its own, which bounds
nothing: a server sending one byte before each of them could keep the
cover, Last.fm or Discord thread busy for as long as it liked. The
whole request now has a deadline. - Every answer is read with a size limit that fits what the endpoint
is asked for — a cover may be 2 MB, a JSON answer much less. The update
check, the checksum files and the AppImage download were bounded
already; the Last.fm, iTunes and Discord lookups and the first-run
probe were not, so a redirected or compromised endpoint could have
answered those until Refrain ran out of memory.
The AppImage bundles third-party software under its own licences; the
list, with versions and where to get the source, is in THIRD-PARTY-NOTICES
below and inside the AppImage. Versions that were taken down, and why, are
listed in docs/releases.md.