diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2016-04-14 16:21:34 +0200 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2016-04-14 16:25:13 +0200 |
commit | 0ec2df77a72edde7b65a4ac8e7ffff4470120a51 (patch) | |
tree | f42ccee095dead476f58700991de24ba00e07177 /src/main.h | |
parent | 8c06a59a34b5d9bba277a50198fe2dd50d832da3 (diff) | |
download | pianobar-0ec2df77a72edde7b65a4ac8e7ffff4470120a51.tar.gz pianobar-0ec2df77a72edde7b65a4ac8e7ffff4470120a51.tar.bz2 pianobar-0ec2df77a72edde7b65a4ac8e7ffff4470120a51.zip |
Fix songfinish event when changing stations
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.
Diffstat (limited to 'src/main.h')
-rw-r--r-- | src/main.h | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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; |