diff options
author | Lars-Dominik Braun <PromyLOPh@gmail.com> | 2008-06-10 12:09:08 +0200 |
---|---|---|
committer | Lars-Dominik Braun <PromyLOPh@gmail.com> | 2008-06-10 12:09:08 +0200 |
commit | f9bc1869e6fcba8f681d38dffa51661a3d87b005 (patch) | |
tree | 36fc7325f1b4fa603ee7f6c03c217ab30f46c943 /libpiano/xml.c | |
parent | 941d4f27ef5337c5be5553f93e41aed7745c71e1 (diff) | |
download | pianobar-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.c | 6 |
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; + } } } |