diff options
author | Lars-Dominik Braun <PromyLOPh@gmail.com> | 2008-06-10 11:11:14 +0200 |
---|---|---|
committer | Lars-Dominik Braun <PromyLOPh@gmail.com> | 2008-06-10 11:11:14 +0200 |
commit | 941d4f27ef5337c5be5553f93e41aed7745c71e1 (patch) | |
tree | 21ab08f45c8e2bf600b2447aa1b7cc93991765da /src | |
parent | c92cbed15b69d823637fb565fefeb6acc3ce178e (diff) | |
download | pianobar-941d4f27ef5337c5be5553f93e41aed7745c71e1.tar.gz pianobar-941d4f27ef5337c5be5553f93e41aed7745c71e1.tar.bz2 pianobar-941d4f27ef5337c5be5553f93e41aed7745c71e1.zip |
Return success/error in PianoRateTrack
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 18 |
1 files changed, 12 insertions, 6 deletions
@@ -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': |