summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars-Dominik Braun <PromyLOPh@gmail.com>2008-06-10 12:21:00 +0200
committerLars-Dominik Braun <PromyLOPh@gmail.com>2008-06-10 12:21:00 +0200
commitf990468cc7f40e5e890d8904e8edaa531d5dfefb (patch)
tree501a467e223414ebc60f4eec032fb586bb88b88c
parent305a4ba4885038f05444b9a7e8664c6ff67b66e2 (diff)
downloadpianobar-windows-f990468cc7f40e5e890d8904e8edaa531d5dfefb.tar.gz
pianobar-windows-f990468cc7f40e5e890d8904e8edaa531d5dfefb.tar.bz2
pianobar-windows-f990468cc7f40e5e890d8904e8edaa531d5dfefb.zip
Do not love tracks twice.
-rw-r--r--src/main.c7
1 files changed, 6 insertions, 1 deletions
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");