diff options
| author | Juan C. Muller <jcmuller@gmail.com> | 2010-11-23 15:17:43 -0500 | 
|---|---|---|
| committer | Lars-Dominik Braun <PromyLOPh@lavabit.com> | 2010-11-23 22:12:29 +0100 | 
| commit | 91192bd1473d6a43eb27ea802ac6fbd451f28fb2 (patch) | |
| tree | 5f0145b52859c1dedd2b0eaab6ef49ddd163382f /libpiano/src | |
| parent | b1ed17b08da468589c178d4a21daa77a481a04c8 (diff) | |
| download | pianobar-91192bd1473d6a43eb27ea802ac6fbd451f28fb2.tar.gz pianobar-91192bd1473d6a43eb27ea802ac6fbd451f28fb2.tar.bz2 pianobar-91192bd1473d6a43eb27ea802ac6fbd451f28fb2.zip | |
Add support for art covers included in the XML playlist from pandora.
See issue #56
Diffstat (limited to 'libpiano/src')
| -rw-r--r-- | libpiano/src/piano.c | 1 | ||||
| -rw-r--r-- | libpiano/src/piano.h | 1 | ||||
| -rw-r--r-- | libpiano/src/xml.c | 2 | 
3 files changed, 4 insertions, 0 deletions
| 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) { | 
