CC-5709: Airtime Analyzer
* Overhauled Add Media screen, now shows state of recent uploads * Dropped old unused "state" column, added new file_import column to cc_files * New PluploadController methods * Save the filename as the track title for unprocessed uploads * Hide pending files from the library until they've been processed. * Don't overwrite files with duplicate names, we rename them instead.
This commit is contained in:
parent
2b696dbee5
commit
878dd11ccc
7 changed files with 122 additions and 37 deletions
|
@ -43,7 +43,7 @@ class Rest_MediaController extends Zend_Rest_Controller
|
|||
|
||||
$this->getResponse()
|
||||
->setHttpResponseCode(200)
|
||||
->appendBody(json_encode($files_array));
|
||||
->appendBody(json_encode($files_array));
|
||||
|
||||
/** TODO: Use this simpler code instead after we upgrade to Propel 1.7 (Airtime 2.6.x branch):
|
||||
$this->getResponse()
|
||||
|
@ -121,8 +121,10 @@ class Rest_MediaController extends Zend_Rest_Controller
|
|||
$file->fromArray($this->validateRequestData($this->getRequest()->getPost()));
|
||||
$file->setDbOwnerId($this->getOwnerId());
|
||||
$now = new DateTime("now", new DateTimeZone("UTC"));
|
||||
$file->setDbTrackTitle($_FILES["file"]["name"]);
|
||||
$file->setDbUtime($now);
|
||||
$file->setDbMtime($now);
|
||||
$file->setDbHidden(true);
|
||||
$file->save();
|
||||
|
||||
$callbackUrl = $this->getRequest()->getScheme() . '://' . $this->getRequest()->getHttpHost() . $this->getRequest()->getRequestUri() . "/" . $file->getPrimaryKey();
|
||||
|
@ -170,7 +172,7 @@ class Rest_MediaController extends Zend_Rest_Controller
|
|||
$file->setDbDirectory(1); //1 corresponds to the default stor/imported directory.
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$now = new DateTime("now", new DateTimeZone("UTC"));
|
||||
$file->setDbMtime($now);
|
||||
$file->save();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue