live info api fix
This commit is contained in:
parent
8c77bfde1d
commit
dc2250c212
|
@ -297,17 +297,23 @@ class ApiController extends Zend_Controller_Action
|
|||
|
||||
$stationUrl = Application_Common_HTTPHelper::getStationUrl();
|
||||
|
||||
$previousID = $result["previous"]["metadata"]["id"];
|
||||
$get_prev_artwork_url = $stationUrl . 'api/track?id='. $previousID .'&return=artwork';
|
||||
$result["previous"]["metadata"]["artwork_url"] = $get_prev_artwork_url;
|
||||
if ($result["previous"]["type"] != "livestream") {
|
||||
$previousID = $result["previous"]["metadata"]["id"];
|
||||
$get_prev_artwork_url = $stationUrl . 'api/track?id='. $previousID .'&return=artwork';
|
||||
$result["previous"]["metadata"]["artwork_url"] = $get_prev_artwork_url;
|
||||
}
|
||||
|
||||
$currID = $result["current"]["metadata"]["id"];
|
||||
$get_curr_artwork_url = $stationUrl . 'api/track?id='. $currID .'&return=artwork';
|
||||
$result["current"]["metadata"]["artwork_url"] = $get_curr_artwork_url;
|
||||
if ($result["current"]["type"] != "livestream") {
|
||||
$currID = $result["current"]["metadata"]["id"];
|
||||
$get_curr_artwork_url = $stationUrl . 'api/track?id='. $currID .'&return=artwork';
|
||||
$result["current"]["metadata"]["artwork_url"] = $get_curr_artwork_url;
|
||||
}
|
||||
|
||||
$nextID = $result["previous"]["metadata"]["id"];
|
||||
$get_next_artwork_url = $stationUrl . 'api/track?id='. $nextID .'&return=artwork';
|
||||
$result["previous"]["metadata"]["artwork_url"] = $get_next_artwork_url;
|
||||
if ($result["next"]["type"] != "livestream") {
|
||||
$nextID = $result["next"]["metadata"]["id"];
|
||||
$get_next_artwork_url = $stationUrl . 'api/track?id='. $nextID .'&return=artwork';
|
||||
$result["next"]["metadata"]["artwork_url"] = $get_next_artwork_url;
|
||||
}
|
||||
|
||||
// apply user-defined timezone, or default to station
|
||||
Application_Common_DateHelper::convertTimestampsToTimezone(
|
||||
|
|
Loading…
Reference in New Issue