CC-430: Audio normalization (Replaygain Support)
-values are now written through to database
This commit is contained in:
parent
b4f1cc13c0
commit
632f039977
6 changed files with 43 additions and 6 deletions
|
@ -956,4 +956,22 @@ class ApiController extends Zend_Controller_Action
|
|||
//connect to db and get get sql
|
||||
$this->view->rows = Application_Model_StoredFile::listAllFiles2($dir_id, 100);
|
||||
}
|
||||
|
||||
public function updateReplayGainValueAction()
|
||||
{
|
||||
$this->checkAuth();
|
||||
|
||||
// disable layout
|
||||
$this->view->layout()->disableLayout();
|
||||
$request = $this->getRequest();
|
||||
$data = json_decode($request->getParam('data'));
|
||||
|
||||
foreach ($data as $pair) {
|
||||
list($id, $gain) = $pair;
|
||||
|
||||
$file = Application_Model_StoredFile::Recall($p_id = $id)->getPropelOrm();
|
||||
Logging::log("Setting $gain for file id $id");
|
||||
$file->setDbReplayGain($gain);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue