CC-2240:Fix up recorded show function

- fixed
- added getName() function agagin to StoredFile
This commit is contained in:
james 2011-06-27 11:23:48 -04:00
parent 396bfd5f8d
commit 629c3fb1d9
2 changed files with 12 additions and 6 deletions

View File

@ -324,15 +324,16 @@ class ApiController extends Zend_Controller_Action
$this->view->fileid = $file_id; $this->view->fileid = $file_id;
$this->view->showinstanceid = $show_instance_id; $this->view->showinstanceid = $show_instance_id;
/*
$showCanceled = false; $showCanceled = false;
$show_instance = $this->_getParam('show_instance'); $file = StoredFile::Recall($file_id);
//$show_instance = $this->_getParam('show_instance');
$show_name = ""; $show_name = "";
try { try {
$show_inst = new ShowInstance($show_instance); $show_inst = new ShowInstance($show_instance_id);
$show_inst->setRecordedFile($file->getId()); $show_inst->setRecordedFile($file_id);
$show_name = $show_inst->getName(); $show_name = $show_inst->getName();
$show_genre = $show_inst->getGenre(); $show_genre = $show_inst->getGenre();
$show_start_time = $show_inst->getShowStart(); $show_start_time = $show_inst->getShowStart();
@ -378,8 +379,8 @@ class ApiController extends Zend_Controller_Action
} }
} }
$this->view->id = $file->getId(); $this->view->id = $file_id;
*/
} }
public function mediaMonitorSetupAction() { public function mediaMonitorSetupAction() {

View File

@ -534,6 +534,11 @@ class StoredFile {
return null; return null;
} }
} }
public function getName(){
$info = pathinfo($this->getFilePath());
return $info['filename'];
}
/** /**
* Create instance of StoreFile object and recall existing file * Create instance of StoreFile object and recall existing file