HTTP: Support a stream title hack

Support a stream title hack employed by some iHeartRadio streams

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
main
Christopher Snowhill 2023-05-31 22:33:50 -07:00
parent 90eb2ded1d
commit c88c9e9aa0
No known key found for this signature in database
1 changed files with 9 additions and 0 deletions

View File

@ -85,6 +85,15 @@ static int http_parse_shoutcast_meta(HTTPSource *fp, const char *meta, size_t si
if(tit) {
*tit = 0;
tit += 3;
if(!strncmp(tit, "text=\"", 6)) { // Hack for a certain stream
char *titfirst = tit + 6;
char *titlast = strchr(titfirst, '"');
if(titlast) {
*titlast = 0;
}
tit = titfirst;
}
const char *orig_title = [fp->title UTF8String];
const char *orig_artist = [fp->artist UTF8String];