CC-6056: Station Metadata API returns wrong streaming links for Shoutcast servers

This commit is contained in:
Albert Santoni 2015-06-09 17:14:33 -04:00
parent ada6b97873
commit fb1fc6fb00

View file

@ -75,8 +75,13 @@ class Application_Model_StreamSetting
$host = $streamData[$prefix."host"]; $host = $streamData[$prefix."host"];
$port = $streamData[$prefix."port"]; $port = $streamData[$prefix."port"];
$mount = $streamData[$prefix."mount"]; $mount = $streamData[$prefix."mount"];
if ($streamData[$prefix."output"] == "shoutcast") {
$url = "http://$host:$port/";
} else { //Icecast
$url = "http://$host:$port/$mount";
}
$streams[$id] = Array( $streams[$id] = Array(
"url" => "http://$host:$port/$mount", "url" => $url,
"codec" => $streamData[$prefix."type"], "codec" => $streamData[$prefix."type"],
"bitrate" => $streamData[$prefix."bitrate"], "bitrate" => $streamData[$prefix."bitrate"],
"mobile" => $streamData[$prefix."mobile"] "mobile" => $streamData[$prefix."mobile"]