From f990468cc7f40e5e890d8904e8edaa531d5dfefb Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Tue, 10 Jun 2008 12:21:00 +0200 Subject: Do not love tracks twice. --- src/main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index e8c15c9..84457df 100644 --- a/src/main.c +++ b/src/main.c @@ -262,7 +262,8 @@ int main (int argc, char **argv) { while (!doQuit) { PianoSong_t *lastSong = NULL; pthread_t playerThread; - printf ("%s by %s\n", curSong->title, curSong->artist); + printf ("\"%s\" by \"%s\"%s\n", curSong->title, curSong->artist, + (curSong->rating == PIANO_RATE_LOVE) ? " (Loved)" : ""); memset (&player, 0, sizeof (player)); player.url = strdup (curSong->audioUrl); @@ -294,6 +295,10 @@ int main (int argc, char **argv) { break; case 'l': + if (curSong->rating == PIANO_RATE_LOVE) { + printf ("Already loved. No need to do this twice.\n"); + break; + } if (PianoRateTrack (&ph, curStation, curSong, PIANO_RATE_LOVE) == PIANO_RET_OK) { printf ("Loved.\n"); -- cgit v1.2.3