From c88c9e9aa0455d9979735b08af1eb97df55b605b Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Wed, 31 May 2023 22:33:50 -0700 Subject: [PATCH] HTTP: Support a stream title hack Support a stream title hack employed by some iHeartRadio streams Signed-off-by: Christopher Snowhill --- Plugins/HTTPSource/HTTPSource.m | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Plugins/HTTPSource/HTTPSource.m b/Plugins/HTTPSource/HTTPSource.m index 5bd24f12a..5e1e66218 100644 --- a/Plugins/HTTPSource/HTTPSource.m +++ b/Plugins/HTTPSource/HTTPSource.m @@ -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];