remove the initial and trailing ' from the icy StreamTitle that shoutcast
likes to insert git-svn-id: https://svn.musicpd.org/mpd/trunk@1366 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
parent
283e34eaae
commit
33a147b31e
|
@ -460,9 +460,14 @@ static void parseIcyMetadata(InputStream * inStream, char * metadata,
|
|||
s = strtok_r(temp, ";", &r);
|
||||
while(s) {
|
||||
if(0 == strncmp(s, "StreamTitle=", 12)) {
|
||||
printf("StreamTitle: %s\n", s+12);
|
||||
int cur = 12;
|
||||
printf("StreamTitle: %s\n", s+cur);
|
||||
if(inStream->metaTitle) free(inStream->metaTitle);
|
||||
inStream->metaTitle = strdup(s+12);
|
||||
if(*(s+cur) == '\'') cur++;
|
||||
if(s[strlen(s)-1] == '\'') {
|
||||
s[strlen(s)-1] = '\0';
|
||||
}
|
||||
inStream->metaTitle = strdup(s+cur);
|
||||
}
|
||||
s = strtok_r(NULL, ";", &r);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue