From 91192bd1473d6a43eb27ea802ac6fbd451f28fb2 Mon Sep 17 00:00:00 2001 From: "Juan C. Muller" Date: Tue, 23 Nov 2010 15:17:43 -0500 Subject: Add support for art covers included in the XML playlist from pandora. See issue #56 --- libpiano/src/piano.c | 1 + libpiano/src/piano.h | 1 + libpiano/src/xml.c | 2 ++ 3 files changed, 4 insertions(+) (limited to 'libpiano') diff --git a/libpiano/src/piano.c b/libpiano/src/piano.c index 52b72c4..f6343b4 100644 --- a/libpiano/src/piano.c +++ b/libpiano/src/piano.c @@ -120,6 +120,7 @@ void PianoDestroyPlaylist (PianoSong_t *playlist) { curSong = playlist; while (curSong != NULL) { free (curSong->audioUrl); + free (curSong->coverArt); free (curSong->artist); free (curSong->musicId); free (curSong->title); diff --git a/libpiano/src/piano.h b/libpiano/src/piano.h index 52cfa75..ef6e386 100644 --- a/libpiano/src/piano.h +++ b/libpiano/src/piano.h @@ -68,6 +68,7 @@ typedef struct PianoSong { char *album; char *userSeed; char *audioUrl; + char *coverArt; char *musicId; char *title; float fileGain; diff --git a/libpiano/src/xml.c b/libpiano/src/xml.c index 36afc87..01294d8 100644 --- a/libpiano/src/xml.c +++ b/libpiano/src/xml.c @@ -259,6 +259,8 @@ static void PianoXmlParsePlaylistCb (const char *key, const ezxml_t value, } free (urlTail); } + } else if (strcmp ("artRadio", key) == 0) { + song->coverArt = strdup (valueStr); } else if (strcmp ("artistSummary", key) == 0) { song->artist = strdup (valueStr); } else if (strcmp ("musicId", key) == 0) { -- cgit v1.2.3