diff --git a/airtime_mvc/application/controllers/ApiController.php b/airtime_mvc/application/controllers/ApiController.php index 6bbe480da..065352ba7 100644 --- a/airtime_mvc/application/controllers/ApiController.php +++ b/airtime_mvc/application/controllers/ApiController.php @@ -42,8 +42,9 @@ class ApiController extends Zend_Controller_Action ->addActionContext('reload-metadata-group' , 'json') ->addActionContext('notify-webstream-data' , 'json') ->addActionContext('get-stream-parameters' , 'json') - ->addActionContext('push-stream-stats' , 'json') - ->addActionContext('update-stream-setting-table' , 'json') + ->addActionContext('push-stream-stats' , 'json') + ->addActionContext('update-stream-setting-table' , 'json') + ->addActionContext('update-replay-gain-value' , 'json') ->initContext(); } @@ -919,10 +920,6 @@ class ApiController extends Zend_Controller_Action public function updateReplayGainValueAction() { - // disable layout - $this->view->layout()->disableLayout(); - $this->_helper->viewRenderer->setNoRender(true); - $request = $this->getRequest(); $data = json_decode($request->getParam('data')); @@ -933,6 +930,8 @@ class ApiController extends Zend_Controller_Action $file->setDbReplayGain($gain); $file->save(); } + + $this->view->msg = "OK"; } public function updateCueValuesBySilanAction() diff --git a/python_apps/api_clients/api_client.cfg b/python_apps/api_clients/api_client.cfg index d9a67b608..0f1050a61 100644 --- a/python_apps/api_clients/api_client.cfg +++ b/python_apps/api_clients/api_client.cfg @@ -115,7 +115,7 @@ get_bootstrap_info = 'get-bootstrap-info/format/json/api_key/%%api_key%%' get_files_without_replay_gain = 'get-files-without-replay-gain/api_key/%%api_key%%/dir_id/%%dir_id%%' -update_replay_gain_value = 'update-replay-gain-value/api_key/%%api_key%%' +update_replay_gain_value = 'update-replay-gain-value/format/json/api_key/%%api_key%%' notify_webstream_data = 'notify-webstream-data/api_key/%%api_key%%/media_id/%%media_id%%/format/json' diff --git a/python_apps/pypo/media/update/replaygainupdater.py b/python_apps/pypo/media/update/replaygainupdater.py index 2f52c0a23..0d971d432 100644 --- a/python_apps/pypo/media/update/replaygainupdater.py +++ b/python_apps/pypo/media/update/replaygainupdater.py @@ -58,7 +58,9 @@ class ReplayGainUpdater(Thread): try: self.api_client.update_replay_gain_values(processed_data) - except Exception as e: self.unexpected_exception(e) + except Exception as e: + self.logger.error(e) + self.logger.debug(traceback.format_exc()) if len(files) == 0: break self.logger.info("Processed: %d songs" % total)