summaryrefslogtreecommitdiff
path: root/libpiano/xml.c
diff options
context:
space:
mode:
authorLars-Dominik Braun <PromyLOPh@gmail.com>2008-06-10 12:09:08 +0200
committerLars-Dominik Braun <PromyLOPh@gmail.com>2008-06-10 12:09:08 +0200
commitf9bc1869e6fcba8f681d38dffa51661a3d87b005 (patch)
tree36fc7325f1b4fa603ee7f6c03c217ab30f46c943 /libpiano/xml.c
parent941d4f27ef5337c5be5553f93e41aed7745c71e1 (diff)
downloadpianobar-windows-f9bc1869e6fcba8f681d38dffa51661a3d87b005.tar.gz
pianobar-windows-f9bc1869e6fcba8f681d38dffa51661a3d87b005.tar.bz2
pianobar-windows-f9bc1869e6fcba8f681d38dffa51661a3d87b005.zip
Get rating from playlist
Diffstat (limited to 'libpiano/xml.c')
-rw-r--r--libpiano/xml.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libpiano/xml.c b/libpiano/xml.c
index 8881ac9..ba6e3c8 100644
--- a/libpiano/xml.c
+++ b/libpiano/xml.c
@@ -167,6 +167,12 @@ void PianoXmlParsePlaylistCb (char *key, xmlNode *value, void *data) {
song->focusTraitId = strdup (valueStr);
} else if (strcmp ("songTitle", key) == 0) {
song->title = strdup (valueStr);
+ } else if (strcmp ("rating", key) == 0) {
+ if (xmlStrEqual (valueStr, "1")) {
+ song->rating = PIANO_RATE_LOVE;
+ } else {
+ song->rating = PIANO_RATE_NONE;
+ }
}
}