It contained a newline, which was not a problem before the sideband
API was introduced. However, with sideband being the default, the
newline character is interpreted as part of the name of the mood or
playlist, causing the mood switch to fail.
The fix is simple: Just remove the trailing newline character.
client_cmd("stop");
if (!afs_mode)
return;
- cmd = make_message("select %s\n", afs_mode);
+ cmd = make_message("select %s", afs_mode);
client_cmd(cmd);
free(cmd);
client_cmd("play");