diff options
author | Lars-Dominik Braun <PromyLOPh@lavabit.com> | 2009-12-15 17:08:19 +0100 |
---|---|---|
committer | Lars-Dominik Braun <PromyLOPh@lavabit.com> | 2009-12-15 17:08:19 +0100 |
commit | 6a62ae4231c2ce10b6623e32198f40f0a2a8e777 (patch) | |
tree | 524e9322520bdbee06cdc20f1b8d636147d7aa9f /libpiano/src/xml.c | |
parent | 927a878f171580c1fdeb4d01caf0a2c9c32f8b42 (diff) | |
download | pianobar-6a62ae4231c2ce10b6623e32198f40f0a2a8e777.tar.gz pianobar-6a62ae4231c2ce10b6623e32198f40f0a2a8e777.tar.bz2 pianobar-6a62ae4231c2ce10b6623e32198f40f0a2a8e777.zip |
New history feature
Default key is 'h', playlists are no longer part of PianoHandle_t now
(=> libpiano's api changed)
Diffstat (limited to 'libpiano/src/xml.c')
-rw-r--r-- | libpiano/src/xml.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libpiano/src/xml.c b/libpiano/src/xml.c index 8e8fb2a..8d34a32 100644 --- a/libpiano/src/xml.c +++ b/libpiano/src/xml.c @@ -484,8 +484,10 @@ PianoReturn_t PianoXmlParseAddSeed (PianoHandle_t *ph, char *xml, /* parses playlist; used when searching too * @param piano handle * @param xml document + * @param return: playlist */ -PianoReturn_t PianoXmlParsePlaylist (PianoHandle_t *ph, char *xml) { +PianoReturn_t PianoXmlParsePlaylist (PianoHandle_t *ph, char *xml, + PianoSong_t **retPlaylist) { ezxml_t xmlDoc, dataNode; PianoReturn_t ret; @@ -508,10 +510,10 @@ PianoReturn_t PianoXmlParsePlaylist (PianoHandle_t *ph, char *xml) { PianoXmlStructParser (ezxml_child (dataNode, "struct"), PianoXmlParsePlaylistCb, tmpSong); /* begin linked list or append */ - if (ph->playlist == NULL) { - ph->playlist = tmpSong; + if (*retPlaylist == NULL) { + *retPlaylist = tmpSong; } else { - PianoSong_t *curSong = ph->playlist; + PianoSong_t *curSong = *retPlaylist; while (curSong->next != NULL) { curSong = curSong->next; } |