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);