diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2011-02-26 14:44:52 +0100 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2011-02-26 14:44:52 +0100 |
commit | c225eea4edfb8cf8ede845cc6f9b7e858aabe6e8 (patch) | |
tree | ca4a3ed13d1e31a211a997641e50cac79cb6df21 /src/ui_act.c | |
parent | a79a0c3fb812efac3370c6ed73d37bb8fd1d318e (diff) | |
download | pianobar-c225eea4edfb8cf8ede845cc6f9b7e858aabe6e8.tar.gz pianobar-c225eea4edfb8cf8ede845cc6f9b7e858aabe6e8.tar.bz2 pianobar-c225eea4edfb8cf8ede845cc6f9b7e858aabe6e8.zip |
Always add song to history
Diffstat (limited to 'src/ui_act.c')
-rw-r--r-- | src/ui_act.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/ui_act.c b/src/ui_act.c index a57cb01..096daa1 100644 --- a/src/ui_act.c +++ b/src/ui_act.c @@ -190,7 +190,8 @@ BarUiActCallback(BarUiActDeleteStation) { if (BarUiActDefaultPianoCall (PIANO_REQUEST_DELETE_STATION, selStation) && selStation == app->curStation) { BarUiDoSkipSong (&app->player); - PianoDestroyPlaylist (app->playlist); + PianoDestroyPlaylist (app->playlist->next); + BarUiHistoryPrepend (app, app->playlist); app->playlist = NULL; app->curStation = NULL; } @@ -381,8 +382,11 @@ BarUiActCallback(BarUiActSelectStation) { app->curStation = newStation; BarUiPrintStation (app->curStation); BarUiDoSkipSong (&app->player); - PianoDestroyPlaylist (app->playlist); - app->playlist = NULL; + if (app->playlist != NULL) { + PianoDestroyPlaylist (app->playlist->next); + BarUiHistoryPrepend (app, app->playlist); + app->playlist = NULL; + } } } |