From 0ec2df77a72edde7b65a4ac8e7ffff4470120a51 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Thu, 14 Apr 2016 16:21:34 +0200 Subject: Fix songfinish event when changing stations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The event did not contain any song data (title, artist, …), because the playlist was destroyed by the ui command. Now the actual station switch is deferred by introducing nextStation and letting the main loop handle it. Fixes issue #584. --- src/ui.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/ui.c') diff --git a/src/ui.c b/src/ui.c index c2a55df..5350dea 100644 --- a/src/ui.c +++ b/src/ui.c @@ -802,7 +802,8 @@ void BarUiStartEventCmd (const BarSettings_t *settings, const char *type, pipeWriteFd = fdopen (pipeFd[1], "w"); - if (curSong != NULL && stations != NULL && curStation->isQuickMix) { + if (curSong != NULL && stations != NULL && curStation != NULL && + curStation->isQuickMix) { songStation = PianoFindStationById (stations, curSong->stationId); } -- cgit v1.2.3