CC-2572 : Set Proper Metadata for a recorded show

This commit is contained in:
Naomi Aro 2011-07-19 18:36:10 +02:00
parent 152c87f099
commit 9aa7b7f403
1 changed files with 35 additions and 28 deletions

View File

@ -341,7 +341,7 @@ class ApiController extends Zend_Controller_Action
$file = StoredFile::Recall($file_id);
//$show_instance = $this->_getParam('show_instance');
$show_name = "";
$show_name = null;
try {
$show_inst = new ShowInstance($show_instance_id);
@ -359,10 +359,17 @@ class ApiController extends Zend_Controller_Action
$showCanceled = true;
}
$tmpTitle = !(empty($show_name))?$show_name."-":"";
$tmpTitle .= $file->getName();
if (isset($show_name)) {
$tmpTitle = "$show_name-$show_start_time";
$tmpTitle = str_replace(":", "-", $tmpTitle);
$tmpTitle = str_replace(" ", "-", $tmpTitle);
}
else {
$tmpTitle = $file->getName();
}
$file->setMetadataValue('MDATA_KEY_TITLE', $tmpTitle);
$file->setMetadataValue('MDATA_KEY_CREATOR', "Airtime Show Recorder");
if (!$showCanceled && Application_Model_Preference::GetDoSoundCloudUpload())
{