SAAS-772: Send metadata to Tunein

Update metadata when station goes offline
This commit is contained in:
drigato 2015-05-19 15:42:07 -04:00
parent c3457ae03f
commit 2da4e264e5
2 changed files with 34 additions and 8 deletions

View file

@ -1,4 +1,5 @@
<?php
require_once('TuneIn.php');
$filepath = realpath (dirname(__FILE__));
require_once($filepath."/../modules/rest/controllers/MediaController.php");
@ -297,6 +298,13 @@ class ScheduleController extends Zend_Controller_Action
public function getCurrentPlaylistAction()
{
$range = Application_Model_Schedule::GetPlayOrderRangeOld();
// If there is no current track playing update TuneIn so it doesn't
// display outdated metadata
if (is_null($range["current"]) && Application_Model_Preference::getTuneinEnabled()) {
Application_Common_TuneIn::updateOfflineMetadata();
}
$show = Application_Model_Show::getCurrentShow();
/* Convert all UTC times to localtime before sending back to user. */