mirror of
https://github.com/JakeStanger/mpd-discord-rpc.git
synced 2026-07-11 05:15:29 +01:00
[GH-ISSUE #264] Format strings that evaluate to one character long don't work and stop further updates from happening #847
Labels
No labels
bug
enhancement
help wanted
package
pull-request
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
JakeStanger/mpd-discord-rpc#847
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @emersonrp on GitHub (Mar 24, 2026).
Original GitHub issue: https://github.com/JakeStanger/mpd-discord-rpc/issues/264
The track in question in this case was Public Image Ltd, "Happy?" from their album "9".
Apparently Discord needs at least two characters for the things it gets sent. This shows up in the logs:
Mar 23 21:15:17 mergatroid mpd-discord-rpc[1272059]: 2026-03-24T01:15:17.647681Z ERROR mpd_discord_rpc: ErrorEvent { code: Some(4000), message: Some("child "activity" fails because [child "state" fails because ["state" length must be at least 2 characters long]]") }
...and the service is then seized up and won't proceed until it's restarted.
I wrote a hackish script to do this mpd<->discord business a couple years ago and I recall having to space-pad anything less than two characters long, just to get Discord not to break.
Edit to add:
I have fiddled with config.toml, which looks like this. Note that yeah, 'state' only contains the album name. I suspect that with the default configuration, though, single-character song titles would break the same way.
@fxzzi commented on GitHub (May 1, 2026):
we already extend the length of the "details" with a zero-width space to avoid this: https://github.com/JakeStanger/mpd-discord-rpc/pull/229
doing the same in this case would probably be fine
@JakeStanger commented on GitHub (May 1, 2026):
Yep, happy to apply that logic everywhere it applies