CC-2569 : Scheduling a rebroadcast show uses old file length access

use new metadata key access.
This commit is contained in:
Naomi Aro 2011-07-19 12:37:06 +02:00
parent 5a9bf18ccc
commit 9de0d490d8
1 changed files with 5 additions and 5 deletions

View File

@ -56,7 +56,7 @@ class ScheduleGroup {
// Check if there are any conflicts with existing entries // Check if there are any conflicts with existing entries
$metadata = $track->getMetadata(); $metadata = $track->getMetadata();
$length = trim($metadata["length"]); $length = $metadata['MDATA_KEY_DURATION'];
if (empty($length)) { if (empty($length)) {
return new PEAR_Error("Length is empty."); return new PEAR_Error("Length is empty.");
} }
@ -540,7 +540,7 @@ class Schedule {
$retVal = $CC_DBC->query($sql); $retVal = $CC_DBC->query($sql);
return $retVal; return $retVal;
} }
public static function getSchduledPlaylistCount(){ public static function getSchduledPlaylistCount(){
global $CC_CONFIG, $CC_DBC; global $CC_CONFIG, $CC_DBC;
$sql = "SELECT count(*) as cnt FROM ".$CC_CONFIG['scheduleTable']; $sql = "SELECT count(*) as cnt FROM ".$CC_CONFIG['scheduleTable'];
@ -750,7 +750,7 @@ class Schedule {
global $CC_CONFIG, $CC_DBC; global $CC_CONFIG, $CC_DBC;
$CC_DBC->query("TRUNCATE TABLE ".$CC_CONFIG["scheduleTable"]); $CC_DBC->query("TRUNCATE TABLE ".$CC_CONFIG["scheduleTable"]);
} }
public static function createNewFormSections($p_view){ public static function createNewFormSections($p_view){
$formWhat = new Application_Form_AddShowWhat(); $formWhat = new Application_Form_AddShowWhat();
$formWho = new Application_Form_AddShowWho(); $formWho = new Application_Form_AddShowWho();
@ -769,7 +769,7 @@ class Schedule {
$formRecord->removeDecorator('DtDdWrapper'); $formRecord->removeDecorator('DtDdWrapper');
$formAbsoluteRebroadcast->removeDecorator('DtDdWrapper'); $formAbsoluteRebroadcast->removeDecorator('DtDdWrapper');
$formRebroadcast->removeDecorator('DtDdWrapper'); $formRebroadcast->removeDecorator('DtDdWrapper');
$p_view->what = $formWhat; $p_view->what = $formWhat;
$p_view->when = $formWhen; $p_view->when = $formWhen;
$p_view->repeats = $formRepeats; $p_view->repeats = $formRepeats;
@ -779,7 +779,7 @@ class Schedule {
$p_view->absoluteRebroadcast = $formAbsoluteRebroadcast; $p_view->absoluteRebroadcast = $formAbsoluteRebroadcast;
$p_view->rebroadcast = $formRebroadcast; $p_view->rebroadcast = $formRebroadcast;
$p_view->addNewShow = true; $p_view->addNewShow = true;
$formWhat->populate(array('add_show_id' => '-1')); $formWhat->populate(array('add_show_id' => '-1'));
$formWhen->populate(array('add_show_start_date' => date("Y-m-d"), $formWhen->populate(array('add_show_start_date' => date("Y-m-d"),
'add_show_start_time' => '00:00', 'add_show_start_time' => '00:00',