CC-2110 : Soundcloud file metadata

added all defaults or ways to input a default for soundcloud metadata.
This commit is contained in:
naomiaro 2011-04-02 16:33:45 -04:00
parent a6927442ec
commit 5a105ff4c8
7 changed files with 126 additions and 10 deletions

View file

@ -276,6 +276,8 @@ class ApiController extends Zend_Controller_Action
$file = StoredFile::uploadFile($upload_dir);
$show_instance = $this->_getParam('show_instance');
$show_name = $this->_getParam('show_name');
$start_time = $this->_getParam('start_time');
$show_inst = new ShowInstance($show_instance);
$show_inst->setRecordedFile($file->getId());
@ -288,9 +290,11 @@ class ApiController extends Zend_Controller_Action
$description = $show->getDescription();
$hosts = $show->getHosts();
$tags = array_merge($hosts, array($show_name));
try {
$soundcloud = new ATSoundcloud();
$soundcloud_id = $soundcloud->uploadTrack($file->getRealFilePath(), $file->getName(), $description, $hosts);
$soundcloud_id = $soundcloud->uploadTrack($file->getRealFilePath(), $file->getName(), $description, $tags, $start_time);
$show_inst->setSoundCloudFileId($soundcloud_id);
break;
}