CC-2098: Only push playlists that havent ended yet
-implemented. Removed ability to specify time ranges for now, and defaulted to looking from now to 24 hours ahead. Being able to specify time ranges was removed, since we are not using bi-directional communication between pypofetch and Airtime server.
This commit is contained in:
parent
343fb593ee
commit
1107a67579
7 changed files with 20 additions and 68 deletions
|
@ -133,6 +133,7 @@ class ApiController extends Zend_Controller_Action
|
|||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
|
||||
$api_key = $this->_getParam('api_key');
|
||||
|
||||
if(!in_array($api_key, $CC_CONFIG["apiKey"]))
|
||||
{
|
||||
header('HTTP/1.0 401 Unauthorized');
|
||||
|
@ -142,12 +143,8 @@ class ApiController extends Zend_Controller_Action
|
|||
|
||||
PEAR::setErrorHandling(PEAR_ERROR_RETURN);
|
||||
|
||||
$from = $this->_getParam("from");
|
||||
$to = $this->_getParam("to");
|
||||
if (Schedule::ValidPypoTimeFormat($from) && Schedule::ValidPypoTimeFormat($to)) {
|
||||
$result = Schedule::ExportRangeAsJson($from, $to);
|
||||
echo json_encode($result);
|
||||
}
|
||||
$result = Schedule::GetScheduledPlaylists();
|
||||
echo json_encode($result);
|
||||
}
|
||||
|
||||
public function notifyMediaItemStartPlayAction()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue