Skip to content

Sleep timer, find in a list, per-list sort, search history - #12

Merged
junaydirfan merged 1 commit into
masterfrom
qol
Nov 24, 2026
Merged

junaydirfan merged 1 commit into
masterfrom
qol

Conversation

@junaydirfan

Copy link
Copy Markdown
Owner

Quality-of-life round. No new dependencies, no new config options, no idle timers.

New

  • z sleep timer: 15 / 30 / 45 / 60 / 90 min, or the end of this song. The volume fades out over the last 8 s, then trill pauses and restores the volume. The now-playing line shows sleep 29m / sleep end. Off, it costs nothing. On, it wakes once, at the start of the fade (then every 0.5 s for the 8 s fade).
  • F find in this list: narrows the open list as you type (title, artist or album, any case). ↑↓ move in it, Enter keeps it, Esc clears it. The title shows “strokes” 40 of 3953. Playing from a narrowed list plays what's shown.
  • Per-list sort: o / O now sort the open list, and each list remembers its own order. Lists you never sorted keep the default from before. Albums and artist pages say they keep their own order, instead of reporting a sort that didn't happen.
  • Search history: ↑↓ in the search box bring back the last 30 searches.
  • D D in the queue removes a song you queued with a.

Fixed

  • Pressing . / , quickly lost about every other seek: 12 presses moved about 1 minute instead of 2. Soloist's position report for one seek arrived after the next seek was sent and reset the position. Reports far from the last seek's target are now ignored for 1 s.
  • The sleep timer's "end of song" mode pauses 1.5 s early. Our position estimate runs a moment behind Soloist's, and once a song ends Soloist starts its own autoplay pick. If the song ends anyway, trill stops rather than starting the next song.

Compatibility

Sorts and searches go in audio_settings as sort <uri>=title and search=… lines. Files from older versions load unchanged (test included). An older trill reading the new file ignores those lines.

Numbers (same scenario as #10)

PSS idle 15.8 MB, Liked Songs open and playing 19.2 MB, after skips 18.6 MB. Paused: 1 wakeup / 20 s. These match 0.4.2. Typing in find on 3,953 rows: 9–20 ms key to frame in tmux, the same as any other key there.

Tested

  • cargo test (new: per-list sorts and searches round-trip, old file loads), cargo clippy with 0 warnings. The help-layout test still fits at 60×40: I merged 2 lines to make room.
  • In tmux: find (type, ↑↓, Enter, Esc, with sort), per-list sort persisted and cleared, search history ↑, z cycling, and a full end-of-song fade. The debug log shows set_volume stepping 65 → 61 → … → 5, then pause and restore to 65, with nothing restarting. Rapid seeks: 12 presses moved exactly 2:00.
  • Not tested: the timed modes running a full 15 min (same code path as end-of-song, with a fixed end time), and macOS/Windows (CI compile only).

… that keep up

- z: sleep timer, 15 / 30 / 45 / 60 / 90 min or the end of this song. The volume fades
  out over the last 8 s, then trill pauses and puts the volume back. No timer runs while
  it's off; while on it wakes once, at the start of the fade.
- F: find in the open list. It narrows as you type (title, artist or album), ↑↓ move in
  it, Enter keeps it, Esc clears it. The title shows "x of y".
- o / O sort the open list, and each list remembers its own order. Albums and artist
  pages say they keep theirs instead of pretending to change.
- ↑↓ in the search box bring back the last 30 searches.
- D D in the queue removes a song you queued with a.
- Pressing . or , quickly kept losing every other seek: Soloist's report for one seek
  arrived after the next was sent and reset the position. Reports far from the last seek's
  target are ignored for a second.
- Sorts and searches go in the same settings file; files from older versions load as before.
@junaydirfan
junaydirfan merged commit 79db1e8 into master Nov 24, 2026
3 checks passed
@junaydirfan
junaydirfan deleted the qol branch November 24, 2026 06:35
@junaydirfan junaydirfan mentioned this pull request Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant