summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLars-Dominik Braun <PromyLOPh@gmail.com>2008-06-10 11:11:14 +0200
committerLars-Dominik Braun <PromyLOPh@gmail.com>2008-06-10 11:11:14 +0200
commit941d4f27ef5337c5be5553f93e41aed7745c71e1 (patch)
tree21ab08f45c8e2bf600b2447aa1b7cc93991765da /src
parentc92cbed15b69d823637fb565fefeb6acc3ce178e (diff)
downloadpianobar-windows-941d4f27ef5337c5be5553f93e41aed7745c71e1.tar.gz
pianobar-windows-941d4f27ef5337c5be5553f93e41aed7745c71e1.tar.bz2
pianobar-windows-941d4f27ef5337c5be5553f93e41aed7745c71e1.zip
Return success/error in PianoRateTrack
Diffstat (limited to 'src')
-rw-r--r--src/main.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/main.c b/src/main.c
index 12aa8a3..e8c15c9 100644
--- a/src/main.c
+++ b/src/main.c
@@ -283,17 +283,23 @@ int main (int argc, char **argv) {
case 'b':
player.doQuit = 1;
- PianoRateTrack (&ph, curStation, curSong,
- PIANO_RATE_BAN);
- printf ("Banned.\n");
+ if (PianoRateTrack (&ph, curStation, curSong,
+ PIANO_RATE_BAN) == PIANO_RET_OK) {
+ printf ("Banned.\n");
+ } else {
+ printf ("Error while banning track.\n");
+ }
/* pandora does this too, I think */
PianoDestroyPlaylist (&ph);
break;
case 'l':
- PianoRateTrack (&ph, curStation, curSong,
- PIANO_RATE_LOVE);
- printf ("Loved.\n");
+ if (PianoRateTrack (&ph, curStation, curSong,
+ PIANO_RATE_LOVE) == PIANO_RET_OK) {
+ printf ("Loved.\n");
+ } else {
+ printf ("Error while loving track.\n");
+ }
break;
case 'n':