Fixed HWC checkbox detection

This commit is contained in:
Josef Citrine 2016-11-21 17:08:34 +00:00
parent 337caa23a8
commit 41cbdb2e97

View file

@ -181,7 +181,7 @@ class EditTrackCommand extends CommandBase
if (isset($this->_input['hwc_submit']) && new \DateTime() < new \DateTime("2016-12-18 00:00:00")) { if (isset($this->_input['hwc_submit']) && new \DateTime() < new \DateTime("2016-12-18 00:00:00")) {
$playlist = Playlist::where('user_id', 22549)->first(); $playlist = Playlist::where('user_id', 22549)->first();
if ($this->_input['hwc_submit'] == true) { if ($this->_input['hwc_submit'] == 'true') {
if (!$playlist->tracks()->get()->contains($track)) { if (!$playlist->tracks()->get()->contains($track)) {
$songIndex = $playlist->trackCount() + 1; $songIndex = $playlist->trackCount() + 1;
$playlist->tracks()->attach($track, ['position' => $songIndex]); $playlist->tracks()->attach($track, ['position' => $songIndex]);