diff --git a/airtime_mvc/application/controllers/ApiController.php b/airtime_mvc/application/controllers/ApiController.php index 2a8a3ad75..be19db869 100644 --- a/airtime_mvc/application/controllers/ApiController.php +++ b/airtime_mvc/application/controllers/ApiController.php @@ -958,8 +958,6 @@ class ApiController extends Zend_Controller_Action public function updateReplayGainValueAction() { - $this->checkAuth(); - // disable layout $this->view->layout()->disableLayout(); $this->_helper->viewRenderer->setNoRender(true); @@ -971,7 +969,7 @@ class ApiController extends Zend_Controller_Action list($id, $gain) = $pair; $file = Application_Model_StoredFile::Recall($p_id = $id)->getPropelOrm(); - Logging::log("Setting $gain for file id $id"); + Logging::debug("Setting $gain for file id $id"); $file->setDbReplayGain($gain); $file->save(); } diff --git a/airtime_mvc/application/models/airtime/map/CcFilesTableMap.php b/airtime_mvc/application/models/airtime/map/CcFilesTableMap.php index 3b48a5327..7ba8d3cb4 100644 --- a/airtime_mvc/application/models/airtime/map/CcFilesTableMap.php +++ b/airtime_mvc/application/models/airtime/map/CcFilesTableMap.php @@ -101,7 +101,7 @@ class CcFilesTableMap extends TableMap { $this->addColumn('SOUNDCLOUD_ERROR_MSG', 'DbSoundcloudErrorMsg', 'VARCHAR', false, 512, null); $this->addColumn('SOUNDCLOUD_LINK_TO_FILE', 'DbSoundcloudLinkToFile', 'VARCHAR', false, 4096, null); $this->addColumn('SOUNDCLOUD_UPLOAD_TIME', 'DbSoundCloundUploadTime', 'TIMESTAMP', false, 6, null); - $this->addColumn('REPLAY_GAIN', 'DbReplayGain', 'VARCHAR', false, 16, '0'); + $this->addColumn('REPLAY_GAIN', 'DbReplayGain', 'VARCHAR', false, 16, null); // validators } // initialize() diff --git a/airtime_mvc/application/models/airtime/om/BaseCcFiles.php b/airtime_mvc/application/models/airtime/om/BaseCcFiles.php index 2bbf894cd..9473418db 100644 --- a/airtime_mvc/application/models/airtime/om/BaseCcFiles.php +++ b/airtime_mvc/application/models/airtime/om/BaseCcFiles.php @@ -412,7 +412,6 @@ abstract class BaseCcFiles extends BaseObject implements Persistent /** * The value for the replay_gain field. - * Note: this column has a database default value of: '0' * @var string */ protected $replay_gain; @@ -472,7 +471,6 @@ abstract class BaseCcFiles extends BaseObject implements Persistent $this->currentlyaccessing = 0; $this->length = '00:00:00'; $this->file_exists = true; - $this->replay_gain = '0'; } /** @@ -2613,7 +2611,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent $v = (string) $v; } - if ($this->replay_gain !== $v || $this->isNew()) { + if ($this->replay_gain !== $v) { $this->replay_gain = $v; $this->modifiedColumns[] = CcFilesPeer::REPLAY_GAIN; } @@ -2663,10 +2661,6 @@ abstract class BaseCcFiles extends BaseObject implements Persistent return false; } - if ($this->replay_gain !== '0') { - return false; - } - // otherwise, everything was equal, so return TRUE return true; } // hasOnlyDefaultValues() diff --git a/airtime_mvc/build/sql/schema.sql b/airtime_mvc/build/sql/schema.sql index 78e58cfe8..fc317e09b 100644 --- a/airtime_mvc/build/sql/schema.sql +++ b/airtime_mvc/build/sql/schema.sql @@ -124,7 +124,7 @@ CREATE TABLE "cc_files" "soundcloud_error_msg" VARCHAR(512), "soundcloud_link_to_file" VARCHAR(4096), "soundcloud_upload_time" TIMESTAMP(6), - "replay_gain" VARCHAR(16) default '0', + "replay_gain" VARCHAR(16), PRIMARY KEY ("id"), CONSTRAINT "cc_files_gunid_idx" UNIQUE ("gunid") );