Merge branch '2.5.x' into 2.5.x-saas

This commit is contained in:
drigato 2014-02-11 10:29:50 -05:00
commit acb3b9b179
4 changed files with 11 additions and 7 deletions

View file

@ -395,13 +395,13 @@ class ApiController extends Zend_Controller_Action
$media_id = $this->_getParam("media_id");
Logging::debug("Received notification of new media item start: $media_id");
Application_Model_Schedule::UpdateMediaPlayedStatus($media_id);
$historyService = new Application_Service_HistoryService();
$historyService->insertPlayedItem($media_id);
//set a 'last played' timestamp for media item
//needed for smart blocks
try {
$historyService = new Application_Service_HistoryService();
$historyService->insertPlayedItem($media_id);
//set a 'last played' timestamp for media item
//needed for smart blocks
$mediaType = Application_Model_Schedule::GetType($media_id);
if ($mediaType == 'file') {
$file_id = Application_Model_Schedule::GetFileId($media_id);

View file

@ -560,6 +560,9 @@ class Application_Service_HistoryService
try {
$item = CcScheduleQuery::create()->findPK($schedId, $this->con);
if (is_null($item)) {
throw new Exception("Invalid schedule id: ".$schedId);
}
//TODO figure out how to combine these all into 1 query.
$showInstance = $item->getCcShowInstances($this->con);