public function uploadRecordedActionParam($show_instance_id, $file_id) { $showCanceled = false; $file = Application_Model_StoredFile::RecallById($file_id); //$show_instance = $this->_getParam('show_instance'); try { $show_inst = new Application_Model_ShowInstance($show_instance_id); $show_inst->setRecordedFile($file_id); } catch (Exception $e) { //we've reached here probably because the show was //cancelled, and therefore the show instance does not exist //anymore (ShowInstance constructor threw this error). We've //done all we can do (upload the file and put it in the //library), now lets just return. $showCanceled = true; } // TODO : the following is inefficient because it calls save on both // fields $file->setMetadataValue('MDATA_KEY_CREATOR', "Airtime Show Recorder"); $file->setMetadataValue('MDATA_KEY_TRACKNUMBER', $show_instance_id); if (!$showCanceled && Application_Model_Preference::GetAutoUploadRecordedShowToSoundcloud()) { $id = $file->getId(); Application_Model_Soundcloud::uploadSoundcloud($id); } }