CC-5254 : Listener Status for SHOUTcast doesn't work
This commit is contained in:
parent
3858371b16
commit
c5221aae6a
2 changed files with 35 additions and 29 deletions
|
@ -70,12 +70,11 @@ class ListenerstatController extends Zend_Controller_Action
|
||||||
|
|
||||||
$starts_epoch = $request->getParam("startTimestamp", $current_time - (60*60*24));
|
$starts_epoch = $request->getParam("startTimestamp", $current_time - (60*60*24));
|
||||||
$ends_epoch = $request->getParam("endTimestamp", $current_time);
|
$ends_epoch = $request->getParam("endTimestamp", $current_time);
|
||||||
$mountName = $request->getParam("mountName", null);
|
|
||||||
|
|
||||||
$startsDT = DateTime::createFromFormat("U", $starts_epoch, new DateTimeZone("UTC"));
|
$startsDT = DateTime::createFromFormat("U", $starts_epoch, new DateTimeZone("UTC"));
|
||||||
$endsDT = DateTime::createFromFormat("U", $ends_epoch, new DateTimeZone("UTC"));
|
$endsDT = DateTime::createFromFormat("U", $ends_epoch, new DateTimeZone("UTC"));
|
||||||
|
|
||||||
$data = Application_Model_ListenerStat::getDataPointsWithinRange($startsDT->format("Y-m-d H:i:s"), $endsDT->format("Y-m-d H:i:s"), $mountName);
|
$data = Application_Model_ListenerStat::getDataPointsWithinRange($startsDT->format("Y-m-d H:i:s"), $endsDT->format("Y-m-d H:i:s"));
|
||||||
$this->_helper->json->sendJson($data);
|
$this->_helper->json->sendJson($data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,6 +62,13 @@ SQL;
|
||||||
if (isset($out[$enabledMountPoint])) {
|
if (isset($out[$enabledMountPoint])) {
|
||||||
$enabledOut[$enabledMountPoint] = $out[$enabledMountPoint];
|
$enabledOut[$enabledMountPoint] = $out[$enabledMountPoint];
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
//TODO fix this hack (here for CC-5254)
|
||||||
|
//all shoutcast streams are automatically put under "shoutcast" mount point.
|
||||||
|
if (isset($out["shoutcast"])) {
|
||||||
|
$enabledOut["shoutcast"] = $out["shoutcast"];
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $enabledOut;
|
return $enabledOut;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue