From 3cd104195cd47a216d871acf04ba47fce246cd28 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Sun, 20 Feb 2011 10:28:14 +0100 Subject: Add song's real station to eventcmd In case we're playing quickmix. See issue #94. --- src/ui.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/ui.c') diff --git a/src/ui.c b/src/ui.c index 5df8cdc..0e8f80b 100644 --- a/src/ui.c +++ b/src/ui.c @@ -602,12 +602,17 @@ void BarUiStartEventCmd (const BarSettings_t *settings, const char *type, pid_t chld; char pipeBuf[1024]; int pipeFd[2]; + PianoStation_t *songStation = NULL; if (settings->eventCmd == NULL) { /* nothing to do... */ return; } + if (curSong != NULL && stations != NULL && curStation->isQuickMix) { + songStation = PianoFindStationById (stations, curSong->stationId); + } + /* prepare stdin content */ memset (pipeBuf, 0, sizeof (pipeBuf)); snprintf (pipeBuf, sizeof (pipeBuf), @@ -616,6 +621,7 @@ void BarUiStartEventCmd (const BarSettings_t *settings, const char *type, "album=%s\n" "coverArt=%s\n" "stationName=%s\n" + "songStationName=%s\n" "pRet=%i\n" "pRetStr=%s\n" "wRet=%i\n" @@ -628,6 +634,7 @@ void BarUiStartEventCmd (const BarSettings_t *settings, const char *type, curSong == NULL ? "" : curSong->album, curSong == NULL ? "" : curSong->coverArt, curStation == NULL ? "" : curStation->name, + songStation == NULL ? "" : songStation->name, pRet, PianoErrorToStr (pRet), wRet, -- cgit v1.2.3