Headset EQ preset control, avatar cache fix, MPRIS now-playing fix #2

Merged
charles merged 3 commits from headset-eq-and-fixes into main 2026-08-30 00:52:28 +00:00
Owner
No description provided.
ensureAvatars() trusted any file that existed at the cache path, so a zero-byte
or truncated PNG — left behind when the daemon was killed mid-write — was
believed forever and that member rendered as an initials placeholder for good.
One such file was sitting in the cache.

Validate the PNG signature instead of merely stat-ing the path, write via a
.part file and rename so an interrupted write can't leave a truncated one, and
retry a failed download with backoff (4s, 8s, ... capped at 5 min) rather than
recording the failure permanently.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SgxBekX2pzvfrtLQpBgGue
The category ranking only ran on a rescan, and a rescan only happened when the
incumbent's own status changed or a player appeared/vanished. A player that was
already running and then started playing went unnoticed — so a paused browser
tab kept the display while the music app played, with the priority list never
consulted.

Subscribe to PropertiesChanged from any sender and rescan when a player reports
Playing. Filtered on that transition so ordinary metadata/position chatter costs
nothing; rescan() is idempotent and ties keep the incumbent, so no flapping.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SgxBekX2pzvfrtLQpBgGue
The Razer BlackShark V3 Pro announces a preset change from its on-ear EQ button
on the vendor HID collection: byte 10 = 0x60, byte 13 = preset 0..8 (captured on
the wire 2026-08-29). The existing parse gated every control on byte 12 == 0x01,
which this report doesn't use, so it was discarded before the control code was
read. Parse it separately and keep a per-press counter, so a cycle that wraps
back to the same preset still registers.

The 4th channel slot on the strip now reads "Mix (<preset>)", and a lone tap on
the chat-mix knob advances the preset (the knob's rotation already re-centres
the balance, so the tap is better spent here). Knobs report only a press-down
edge, so gestures have to be click-count based.

The headset is authoritative for the displayed value: blacksharkd's EqPreset
property is a write-through cache of what D-Bus last set and never sees the
button, so once the headset reports a preset the property must not override it.

Only five presets are distinct — Default, Game, Movie, Music, Esports 1; slots
5..8 announce Default. The knob cycles the five and skips the duplicates, while
the names cover all nine because the headset's own button can still reach them.
Names are overridable in config.json, and are only persisted once changed so a
later default correction still reaches an untouched config.

Also carries in-progress work on the tile renderer, PulseAudio handling and the
Qt window that was already in the tree.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SgxBekX2pzvfrtLQpBgGue
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/mirabox-application!2
No description provided.