diff options
author | Lars-Dominik Braun <PromyLOPh@gmail.com> | 2008-06-12 17:18:00 +0200 |
---|---|---|
committer | Lars-Dominik Braun <PromyLOPh@gmail.com> | 2008-06-12 17:18:00 +0200 |
commit | fd978b5fa3ad57813c39d831d2bb7c4751d2adfd (patch) | |
tree | e2fa8426c1f497453804514ca736b9550e52d227 /libpiano | |
parent | 35c306d0e917a3fcbca30e9ad09a214e57548edd (diff) | |
download | pianobar-fd978b5fa3ad57813c39d831d2bb7c4751d2adfd.tar.gz pianobar-fd978b5fa3ad57813c39d831d2bb7c4751d2adfd.tar.bz2 pianobar-fd978b5fa3ad57813c39d831d2bb7c4751d2adfd.zip |
lib: Update local data after rating track
This prevents the user from loving a track two times, e.g.
Diffstat (limited to 'libpiano')
-rw-r--r-- | libpiano/main.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libpiano/main.c b/libpiano/main.c index 17bef4b..4d186a9 100644 --- a/libpiano/main.c +++ b/libpiano/main.c @@ -304,6 +304,11 @@ PianoReturn_t PianoRateTrack (PianoHandle_t *ph, PianoStation_t *station, (rating == PIANO_RATE_LOVE) ? "true" : "false"); PianoHttpPost (ph->curlHandle, url, requestStr, &retStr); ret = PianoXmlParseSimple (retStr); + + if (ret == PIANO_RET_OK) { + song->rating = rating; + } + free (requestStr); free (retStr); |