Fixed a fresh install bug that wasn't using composer installs.

Fixed a cloud file download bug where it was downloading the wrong track.
Working on amazon s3 signed urls for private objects.
Added cloud storage configuration to install script.
This commit is contained in:
drigato 2014-10-14 16:54:58 -04:00
parent 2423ea6787
commit a10e287368
7 changed files with 58 additions and 9 deletions

View file

@ -48,6 +48,7 @@ class AudiopreviewController extends Zend_Controller_Action
if ($type == "audioclip") {
$media = Application_Model_StoredFile::RecallById($audioFileID);
$uri = $baseUrl."api/get-media/file/".$audioFileID;
//$uri = $media->getPropelOrm()->downloadFile();
$mime = $media->getPropelOrm()->getDbMime();
} elseif ($type == "stream") {
$webstream = CcWebstreamQuery::create()->findPk($audioFileID);

View file

@ -191,7 +191,6 @@ class LibraryController extends Zend_Controller_Action
$obj_sess = new Zend_Session_Namespace(UI_PLAYLISTCONTROLLER_OBJ_SESSNAME);
if ($type === "audioclip") {
$file = Application_Model_StoredFile::RecallById($id);
$menu["play"]["mime"] = $file->getPropelOrm()->getDbMime();
@ -216,7 +215,11 @@ class LibraryController extends Zend_Controller_Action
$menu["edit"] = array("name"=> _("Edit Metadata"), "icon" => "edit", "url" => $baseUrl."library/edit-file-md/id/{$id}");
}
$url = $file->getRelativeFileUrl($baseUrl).'/download/true';
// It's important that we always return the parent id (cc_files id)
// and not the cloud_file id (if applicable) for track download.
// Our application logic (StoredFile.php) will determine if the track
// is a cloud_file and handle it appropriately.
$url = $baseUrl."api/get-media/file/".$id.".".$file->getFileExtension().'/download/true';
$menu["download"] = array("name" => _("Download"), "icon" => "download", "url" => $url);
} elseif ($type === "playlist" || $type === "block") {
if ($type === 'playlist') {