From fd978b5fa3ad57813c39d831d2bb7c4751d2adfd Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Thu, 12 Jun 2008 17:18:00 +0200 Subject: lib: Update local data after rating track This prevents the user from loving a track two times, e.g. --- libpiano/main.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libpiano') 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); -- cgit v1.2.3