From f5ec2fd02149c64869beadfb7575c17141e0c58e Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sun, 30 Jul 2017 02:25:26 +0200 Subject: [PATCH] Force status item update on mood/playlist changes. This patch increments the mmd event counter whenever a new playlist or mood is loaded. This instructs the stat command handlers to resend the list of status items to all connected stat clients. --- afs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/afs.c b/afs.c index b92cf0f2..ef05a473 100644 --- a/afs.c +++ b/afs.c @@ -497,10 +497,12 @@ static int activate_mood_or_playlist(const char *arg, int *num_admissible) strncpy(mmd->afs_mode_string, arg, sizeof(mmd->afs_mode_string)); mmd->afs_mode_string[sizeof(mmd->afs_mode_string) - 1] = '\0'; + mmd->events++; mutex_unlock(mmd_mutex); } else { mutex_lock(mmd_mutex); strcpy(mmd->afs_mode_string, "dummy"); + mmd->events++; mutex_unlock(mmd_mutex); current_mop = NULL; } -- 2.39.2