CC-4005: Tag files with Last Played date and number of times played

- fixed CRLF
This commit is contained in:
James 2012-09-10 18:07:12 -04:00
parent 645593f954
commit 585ee579d6
4 changed files with 10 additions and 10 deletions
airtime_mvc/application

View File

@ -372,7 +372,7 @@ class ApiController extends Zend_Controller_Action
$webStream = new Application_Model_Webstream($stream_id); $webStream = new Application_Model_Webstream($stream_id);
var_dump($webStream); var_dump($webStream);
$now = new DateTime("now", new DateTimeZone("UTC")); $now = new DateTime("now", new DateTimeZone("UTC"));
$webStream->setLastPlayed($now); $webStream->setLastPlayed($now);
} }
} }
} catch (Exception $e) { } catch (Exception $e) {

View File

@ -1175,10 +1175,10 @@ SQL;
return $scheduledItem->getDbFileId(); return $scheduledItem->getDbFileId();
} }
public static function GetStreamId($p_scheduleId) public static function GetStreamId($p_scheduleId)
{ {
$scheduledItem = CcScheduleQuery::create()->findPK($p_scheduleId); $scheduledItem = CcScheduleQuery::create()->findPK($p_scheduleId);
return $scheduledItem->getDbStreamId(); return $scheduledItem->getDbStreamId();
} }
} }

View File

@ -689,9 +689,9 @@ class Application_Model_StoredFile
$fileSelect[] = $key; $fileSelect[] = $key;
$streamSelect[] = "NULL::NUMERIC AS ".$key; $streamSelect[] = "NULL::NUMERIC AS ".$key;
} elseif ($key === "lptime") { } elseif ($key === "lptime") {
$plSelect[] = "NULL::TIMESTAMP AS ".$key; $plSelect[] = "NULL::TIMESTAMP AS ".$key;
$blSelect[] = "NULL::TIMESTAMP AS ".$key; $blSelect[] = "NULL::TIMESTAMP AS ".$key;
$fileSelect[] = $key; $fileSelect[] = $key;
$streamSelect[] = $key; $streamSelect[] = $key;
} }
//same columns in each table. //same columns in each table.

View File

@ -221,7 +221,7 @@ class Application_Model_Webstream implements Application_Model_LibraryEditable
} }
public function setLastPlayed($timestamp) public function setLastPlayed($timestamp)
{ {
$this->webstream->setDbLPtime($timestamp); $this->webstream->setDbLPtime($timestamp);
$this->webstream->save(); $this->webstream->save();