CC-5709: Airtime Analyzer

* Remove awful StoredFile::uploadFile() function
* Massive airtime_analyzer commenting and cleanup
* Cleaned up the upload code
* Temporarily disabled the liquidsoap playability test.
This commit is contained in:
Albert Santoni 2014-04-03 16:13:26 -04:00
parent cb62850558
commit 95b369c54d
13 changed files with 204 additions and 191 deletions

View file

@ -333,22 +333,19 @@ class Rest_MediaController extends Zend_Rest_Controller
$CC_CONFIG = Config::getConfig();
$apiKey = $CC_CONFIG["apiKey"][0];
$upload_dir = ini_get("upload_tmp_dir") . DIRECTORY_SEPARATOR . "plupload";
$tempFilePath = Application_Model_StoredFile::uploadFile($upload_dir);
//$upload_dir = ini_get("upload_tmp_dir") . DIRECTORY_SEPARATOR . "plupload";
//$tempFilePath = Application_Model_StoredFile::uploadFile($upload_dir);
$tempFilePath = $_FILES['file']['tmp_name'];
$tempFileName = basename($tempFilePath);
//TODO: Remove copyFileToStor from StoredFile...
//TODO: Remove uploadFileAction from ApiController.php **IMPORTANT** - It's used by the recorder daemon?
$upload_dir = ini_get("upload_tmp_dir") . DIRECTORY_SEPARATOR . "plupload";
$tempFilePath = $upload_dir . "/" . $tempFileName;
$storDir = Application_Model_MusicDir::getStorDir();
//$finalFullFilePath = $storDir->getDirectory() . "/imported/" . $ownerId . "/" . $originalFilename;
$importedStorageDirectory = $storDir->getDirectory() . "/imported/" . $ownerId;
try {
//Copy the temporary file over to the "organize" folder so that it's off our webserver
//and accessible by airtime_analyzer which could be running on a different machine.
@ -357,8 +354,8 @@ class Rest_MediaController extends Zend_Rest_Controller
Logging::error($e->getMessage());
}
//Logging::info("New temporary file path: " . $newTempFilePath);
//Logging::info("Final file path: " . $finalFullFilePath);
Logging::info($newTempFilePath);
//Logging::info("Old temp file path: " . $tempFilePath);
//Dispatch a message to airtime_analyzer through RabbitMQ,
//notifying it that there's a new upload to process!