CC-1665: Scheduled stream rebroadcasting and recording
-remove some hardcoded webstream values -fix some broken problems from devel
This commit is contained in:
parent
fbc5b72f14
commit
ccdc06786d
2 changed files with 27 additions and 9 deletions
|
@ -190,7 +190,7 @@ EOT;
|
||||||
|
|
||||||
$clipSec = Application_Model_Playlist::playlistTimeToSeconds($row['length']);
|
$clipSec = Application_Model_Playlist::playlistTimeToSeconds($row['length']);
|
||||||
$offset += $clipSec;
|
$offset += $clipSec;
|
||||||
$offset_cliplength = Application_Model_Playlist::secondsToPlaylistTime($offset);
|
$offset_cliplength = Application_Common_DateHelper::secondsToPlaylistTime($offset);
|
||||||
|
|
||||||
//format the length for UI.
|
//format the length for UI.
|
||||||
$formatter = new LengthFormatter($row['length']);
|
$formatter = new LengthFormatter($row['length']);
|
||||||
|
|
|
@ -2,34 +2,52 @@
|
||||||
|
|
||||||
class Application_Model_Webstream{
|
class Application_Model_Webstream{
|
||||||
|
|
||||||
public static function getName(){
|
public static function getName()
|
||||||
|
{
|
||||||
return "Default";
|
return "Default";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getId(){
|
public static function getId()
|
||||||
|
{
|
||||||
return "id";
|
return "id";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getLastModified($p_type){
|
public static function getLastModified($p_type)
|
||||||
|
{
|
||||||
return "modified";
|
return "modified";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getDefaultLength(){
|
public static function getDefaultLength()
|
||||||
|
{
|
||||||
return "length";
|
return "length";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getDescription(){
|
public static function getDescription()
|
||||||
|
{
|
||||||
return "desc";
|
return "desc";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function save($request){
|
public static function save($request)
|
||||||
|
{
|
||||||
Logging::log($request->getParams());
|
Logging::log($request->getParams());
|
||||||
|
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
|
||||||
|
Logging::log($userInfo);
|
||||||
|
|
||||||
|
$length = trim($request->getParam("length"));
|
||||||
|
preg_match("/^([0-9]{1,2})h ([0-5][0-9])m$/", $length, $matches);
|
||||||
|
$hours = $matches[1];
|
||||||
|
$minutes = $matches[2];
|
||||||
|
$di = new DateInterval("PT{$hours}H{$minutes}M");
|
||||||
|
$dblength = $di->format("%H:%I");
|
||||||
|
|
||||||
|
#TODO: These should be validated by a Zend Form.
|
||||||
$webstream = new CcWebstream();
|
$webstream = new CcWebstream();
|
||||||
$webstream->setDbName($request->getParam("name"));
|
$webstream->setDbName($request->getParam("name"));
|
||||||
$webstream->setDbDescription($request->getParam("description"));
|
$webstream->setDbDescription($request->getParam("description"));
|
||||||
$webstream->setDbUrl($request->getParam("url"));
|
$webstream->setDbUrl($request->getParam("url"));
|
||||||
$webstream->setDbLength("00:05:00");
|
|
||||||
$webstream->setDbLogin("xxx");
|
$webstream->setDbLength($dblength);
|
||||||
|
$webstream->setDbLogin($userInfo->id);
|
||||||
$webstream->setDbUtime(new DateTime());
|
$webstream->setDbUtime(new DateTime());
|
||||||
$webstream->setDbMtime(new DateTime());
|
$webstream->setDbMtime(new DateTime());
|
||||||
$webstream->save();
|
$webstream->save();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue