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/main.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/main.h') diff --git a/src/main.h b/src/main.h index 0dd2647..7dc0ac8 100644 --- a/src/main.h +++ b/src/main.h @@ -39,7 +39,9 @@ typedef struct { /* first item is current song */ PianoSong_t *playlist; PianoSong_t *songHistory; - PianoStation_t *curStation; + /* station of current song and station used to fetch songs from if playlist + * is empty */ + PianoStation_t *curStation, *nextStation; sig_atomic_t doQuit; BarReadlineFds_t input; unsigned int playerErrors; -- cgit v1.2.3