diff options
Diffstat (limited to 'libpiano/src/xml.c')
-rw-r--r-- | libpiano/src/xml.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/libpiano/src/xml.c b/libpiano/src/xml.c index 33fe557..78f7f21 100644 --- a/libpiano/src/xml.c +++ b/libpiano/src/xml.c @@ -745,27 +745,27 @@ PianoReturn_t PianoXmlParseGenreExplorer (PianoHandle_t *ph, char *xml) { /* get genre subnodes */ for (genreNode = ezxml_child (catNode, "genre"); genreNode; genreNode = genreNode->next) { - PianoStation_t *tmpStation; + PianoGenre_t *tmpGenre; - if ((tmpStation = calloc (1, sizeof (*tmpStation))) == NULL) { + if ((tmpGenre = calloc (1, sizeof (*tmpGenre))) == NULL) { ezxml_free (xmlDoc); return PIANO_RET_OUT_OF_MEMORY; } /* get genre attributes */ - tmpStation->name = strdup (ezxml_attr (genreNode, "name")); - tmpStation->id = strdup (ezxml_attr (genreNode, "stationId")); + tmpGenre->name = strdup (ezxml_attr (genreNode, "name")); + tmpGenre->musicId = strdup (ezxml_attr (genreNode, "musicId")); /* append station */ - if (tmpGenreCategory->stations == NULL) { - tmpGenreCategory->stations = tmpStation; + if (tmpGenreCategory->genres == NULL) { + tmpGenreCategory->genres = tmpGenre; } else { - PianoStation_t *curStation = - tmpGenreCategory->stations; - while (curStation->next != NULL) { - curStation = curStation->next; + PianoGenre_t *curGenre = + tmpGenreCategory->genres; + while (curGenre->next != NULL) { + curGenre = curGenre->next; } - curStation->next = tmpStation; + curGenre->next = tmpGenre; } } /* append category */ |