summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLars-Dominik Braun <PromyLOPh@gmail.com>2008-06-10 10:35:54 +0200
committerLars-Dominik Braun <PromyLOPh@gmail.com>2008-06-10 10:35:54 +0200
commitc92cbed15b69d823637fb565fefeb6acc3ce178e (patch)
tree499039436f0187697a7409d011a8879e5c097e44 /src
parent112528c8abaf712e2db0f8aef6b7d64b52281127 (diff)
downloadpianobar-windows-c92cbed15b69d823637fb565fefeb6acc3ce178e.tar.gz
pianobar-windows-c92cbed15b69d823637fb565fefeb6acc3ce178e.tar.bz2
pianobar-windows-c92cbed15b69d823637fb565fefeb6acc3ce178e.zip
fix love and ban
Diffstat (limited to 'src')
-rw-r--r--src/main.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/main.c b/src/main.c
index d125122..12aa8a3 100644
--- a/src/main.c
+++ b/src/main.c
@@ -285,12 +285,15 @@ int main (int argc, char **argv) {
player.doQuit = 1;
PianoRateTrack (&ph, curStation, curSong,
PIANO_RATE_BAN);
+ printf ("Banned.\n");
+ /* pandora does this too, I think */
PianoDestroyPlaylist (&ph);
break;
case 'l':
PianoRateTrack (&ph, curStation, curSong,
PIANO_RATE_LOVE);
+ printf ("Loved.\n");
break;
case 'n':
@@ -303,13 +306,11 @@ int main (int argc, char **argv) {
break;
case 's':
- /* FIXME: does not work, segfault... */
player.doQuit = 1;
PianoDestroyPlaylist (&ph);
curStation = selectStation (&ph);
printf ("changed station to %s\n", curStation->name);
break;
-
}
}
}
@@ -321,10 +322,11 @@ int main (int argc, char **argv) {
curSong = lastSong->next;
if (curSong == NULL && !doQuit) {
printf ("receiving new playlist\n");
+ PianoDestroyPlaylist (&ph);
PianoGetPlaylist (&ph, curStation->id);
- curSong = lastSong->next;
+ curSong = ph.playlist;
if (curSong == NULL) {
- /* no tracks left */
+ printf ("no tracks left\n");
doQuit = 1;
}
}