diff options
author | Lars-Dominik Braun <PromyLOPh@lavabit.com> | 2009-01-27 18:17:11 +0100 |
---|---|---|
committer | Lars-Dominik Braun <PromyLOPh@lavabit.com> | 2009-01-27 18:17:11 +0100 |
commit | 993acf04daaa3b03d1c7d3878f2db4f2b32d9ffa (patch) | |
tree | ab4644749bba0dc4a92c4dd153b9bbfc489f7f21 | |
parent | 6f02b03ebc28de6c8d19599d7aa0a9066f9d83ee (diff) | |
download | pianobar-windows-993acf04daaa3b03d1c7d3878f2db4f2b32d9ffa.tar.gz pianobar-windows-993acf04daaa3b03d1c7d3878f2db4f2b32d9ffa.tar.bz2 pianobar-windows-993acf04daaa3b03d1c7d3878f2db4f2b32d9ffa.zip |
Fix song moving while playing quickmix
Use *real* station id, not the one of the quickmix station
-rw-r--r-- | src/ui_act.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/ui_act.c b/src/ui_act.c index 3046445..ae42164 100644 --- a/src/ui_act.c +++ b/src/ui_act.c @@ -208,7 +208,7 @@ void BarUiActSkipSong (BAR_KS_ARGS) { /* move song to different station */ void BarUiActMoveSong (BAR_KS_ARGS) { - PianoStation_t *moveStation; + PianoStation_t *moveStation, *fromStation; RETURN_IF_NO_SONG; @@ -220,7 +220,12 @@ void BarUiActMoveSong (BAR_KS_ARGS) { } printf ("Moving song to \"%s\"... ", moveStation->name); fflush (stdout); - if (BarUiPrintPianoStatus (PianoMoveSong (ph, *curStation, + fromStation = PianoFindStationById (ph->stations, (*curSong)->stationId); + if (fromStation == NULL) { + BarUiMsg ("Station not found\n"); + return; + } + if (BarUiPrintPianoStatus (PianoMoveSong (ph, fromStation, moveStation, *curSong)) == PIANO_RET_OK) { player->doQuit = 1; } |