From ddecfb09587b713d3e753714b8078a3b8719e4a4 Mon Sep 17 00:00:00 2001 From: Naomi Date: Thu, 3 Apr 2014 12:53:37 -0400 Subject: [PATCH] CC-5769 : Reimplement the is scheduled/is playlist flags in the library removing is scheduled/is playlist --- .../controllers/LibraryController.php | 74 ----- .../models/airtime/map/AudioFileTableMap.php | 2 - .../models/airtime/om/BaseAudioFile.php | 258 ++++-------------- .../models/airtime/om/BaseAudioFilePeer.php | 44 ++- .../models/airtime/om/BaseAudioFileQuery.php | 64 +---- .../services/DatatableAudioFileService.php | 22 -- airtime_mvc/build/schema.xml | 2 - airtime_mvc/build/sql/schema.sql | 2 - 8 files changed, 77 insertions(+), 391 deletions(-) diff --git a/airtime_mvc/application/controllers/LibraryController.php b/airtime_mvc/application/controllers/LibraryController.php index 51f108cd1..e6887136c 100644 --- a/airtime_mvc/application/controllers/LibraryController.php +++ b/airtime_mvc/application/controllers/LibraryController.php @@ -217,80 +217,6 @@ class LibraryController extends Zend_Controller_Action } */ - public function deleteAction() - { - //array containing id and type of media to delete. - $mediaItems = $this->_getParam('media', null); - - $user = Application_Model_User::getCurrentUser(); - //$isAdminOrPM = $user->isUserType(array(UTYPE_ADMIN, UTYPE_PROGRAM_MANAGER)); - - $files = array(); - $playlists = array(); - $blocks = array(); - $streams = array(); - - $message = null; - $noPermissionMsg = _("You don't have permission to delete selected items."); - - foreach ($mediaItems as $media) { - - if ($media["type"] === "audioclip") { - $files[] = intval($media["id"]); - } elseif ($media["type"] === "playlist") { - $playlists[] = intval($media["id"]); - } elseif ($media["type"] === "block") { - $blocks[] = intval($media["id"]); - } elseif ($media["type"] === "stream") { - $streams[] = intval($media["id"]); - } - } - - try { - Application_Model_Playlist::deletePlaylists($playlists, $user->getId()); - } catch (PlaylistNoPermissionException $e) { - $message = $noPermissionMsg; - } - - try { - Application_Model_Block::deleteBlocks($blocks, $user->getId()); - } catch (BlockNoPermissionException $e) { - $message = $noPermissionMsg; - } catch (Exception $e) { - //TODO: warn user that not all blocks could be deleted. - } - - try { - Application_Model_Webstream::deleteStreams($streams, $user->getId()); - } catch (WebstreamNoPermissionException $e) { - $message = $noPermissionMsg; - } catch (Exception $e) { - //TODO: warn user that not all streams could be deleted. - Logging::info($e); - } - - foreach ($files as $id) { - - $file = Application_Model_StoredFile::RecallById($id); - - if (isset($file)) { - try { - $res = $file->delete(); - } catch (FileNoPermissionException $e) { - $message = $noPermissionMsg; - } catch (Exception $e) { - //could throw a scheduled in future exception. - $message = _("Could not delete some scheduled files."); - Logging::debug($e->getMessage()); - } - } - } - - if (isset($message)) { - $this->view->message = $message; - } - } - // duplicate playlist public function duplicateAction(){ $params = $this->getRequest()->getParams(); diff --git a/airtime_mvc/application/models/airtime/map/AudioFileTableMap.php b/airtime_mvc/application/models/airtime/map/AudioFileTableMap.php index e830907f5..dd60d9a48 100644 --- a/airtime_mvc/application/models/airtime/map/AudioFileTableMap.php +++ b/airtime_mvc/application/models/airtime/map/AudioFileTableMap.php @@ -71,8 +71,6 @@ class AudioFileTableMap extends TableMap $this->addColumn('silan_check', 'IsSilanChecked', 'BOOLEAN', false, null, false); $this->addColumn('file_exists', 'FileExists', 'BOOLEAN', false, null, true); $this->addColumn('hidden', 'FileHidden', 'BOOLEAN', false, null, false); - $this->addColumn('is_scheduled', 'IsScheduled', 'BOOLEAN', false, null, false); - $this->addColumn('is_playlist', 'IsPlaylist', 'BOOLEAN', false, null, false); $this->addForeignPrimaryKey('id', 'Id', 'INTEGER' , 'media_item', 'id', true, null, null); $this->addColumn('name', 'Name', 'VARCHAR', false, 512, null); $this->addColumn('creator', 'Creator', 'VARCHAR', false, 512, null); diff --git a/airtime_mvc/application/models/airtime/om/BaseAudioFile.php b/airtime_mvc/application/models/airtime/om/BaseAudioFile.php index 022ed804b..a42bc198a 100644 --- a/airtime_mvc/application/models/airtime/om/BaseAudioFile.php +++ b/airtime_mvc/application/models/airtime/om/BaseAudioFile.php @@ -230,20 +230,6 @@ abstract class BaseAudioFile extends MediaItem implements Persistent */ protected $hidden; - /** - * The value for the is_scheduled field. - * Note: this column has a database default value of: false - * @var boolean - */ - protected $is_scheduled; - - /** - * The value for the is_playlist field. - * Note: this column has a database default value of: false - * @var boolean - */ - protected $is_playlist; - /** * The value for the id field. * @var int @@ -367,8 +353,6 @@ abstract class BaseAudioFile extends MediaItem implements Persistent $this->silan_check = false; $this->file_exists = true; $this->hidden = false; - $this->is_scheduled = false; - $this->is_playlist = false; $this->play_count = 0; $this->length = '00:00:00'; } @@ -702,28 +686,6 @@ abstract class BaseAudioFile extends MediaItem implements Persistent return $this->hidden; } - /** - * Get the [is_scheduled] column value. - * - * @return boolean - */ - public function getIsScheduled() - { - - return $this->is_scheduled; - } - - /** - * Get the [is_playlist] column value. - * - * @return boolean - */ - public function getIsPlaylist() - { - - return $this->is_playlist; - } - /** * Get the [id] column value. * @@ -1565,64 +1527,6 @@ abstract class BaseAudioFile extends MediaItem implements Persistent return $this; } // setFileHidden() - /** - * Sets the value of the [is_scheduled] column. - * Non-boolean arguments are converted using the following rules: - * * 1, '1', 'true', 'on', and 'yes' are converted to boolean true - * * 0, '0', 'false', 'off', and 'no' are converted to boolean false - * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). - * - * @param boolean|integer|string $v The new value - * @return AudioFile The current object (for fluent API support) - */ - public function setIsScheduled($v) - { - if ($v !== null) { - if (is_string($v)) { - $v = in_array(strtolower($v), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true; - } else { - $v = (boolean) $v; - } - } - - if ($this->is_scheduled !== $v) { - $this->is_scheduled = $v; - $this->modifiedColumns[] = AudioFilePeer::IS_SCHEDULED; - } - - - return $this; - } // setIsScheduled() - - /** - * Sets the value of the [is_playlist] column. - * Non-boolean arguments are converted using the following rules: - * * 1, '1', 'true', 'on', and 'yes' are converted to boolean true - * * 0, '0', 'false', 'off', and 'no' are converted to boolean false - * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). - * - * @param boolean|integer|string $v The new value - * @return AudioFile The current object (for fluent API support) - */ - public function setIsPlaylist($v) - { - if ($v !== null) { - if (is_string($v)) { - $v = in_array(strtolower($v), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true; - } else { - $v = (boolean) $v; - } - } - - if ($this->is_playlist !== $v) { - $this->is_playlist = $v; - $this->modifiedColumns[] = AudioFilePeer::IS_PLAYLIST; - } - - - return $this; - } // setIsPlaylist() - /** * Set the value of [id] column. * @@ -1923,14 +1827,6 @@ abstract class BaseAudioFile extends MediaItem implements Persistent return false; } - if ($this->is_scheduled !== false) { - return false; - } - - if ($this->is_playlist !== false) { - return false; - } - if ($this->play_count !== 0) { return false; } @@ -1990,20 +1886,18 @@ abstract class BaseAudioFile extends MediaItem implements Persistent $this->silan_check = ($row[$startcol + 26] !== null) ? (boolean) $row[$startcol + 26] : null; $this->file_exists = ($row[$startcol + 27] !== null) ? (boolean) $row[$startcol + 27] : null; $this->hidden = ($row[$startcol + 28] !== null) ? (boolean) $row[$startcol + 28] : null; - $this->is_scheduled = ($row[$startcol + 29] !== null) ? (boolean) $row[$startcol + 29] : null; - $this->is_playlist = ($row[$startcol + 30] !== null) ? (boolean) $row[$startcol + 30] : null; - $this->id = ($row[$startcol + 31] !== null) ? (int) $row[$startcol + 31] : null; - $this->name = ($row[$startcol + 32] !== null) ? (string) $row[$startcol + 32] : null; - $this->creator = ($row[$startcol + 33] !== null) ? (string) $row[$startcol + 33] : null; - $this->source = ($row[$startcol + 34] !== null) ? (string) $row[$startcol + 34] : null; - $this->owner_id = ($row[$startcol + 35] !== null) ? (int) $row[$startcol + 35] : null; - $this->description = ($row[$startcol + 36] !== null) ? (string) $row[$startcol + 36] : null; - $this->last_played = ($row[$startcol + 37] !== null) ? (string) $row[$startcol + 37] : null; - $this->play_count = ($row[$startcol + 38] !== null) ? (int) $row[$startcol + 38] : null; - $this->length = ($row[$startcol + 39] !== null) ? (string) $row[$startcol + 39] : null; - $this->mime = ($row[$startcol + 40] !== null) ? (string) $row[$startcol + 40] : null; - $this->created_at = ($row[$startcol + 41] !== null) ? (string) $row[$startcol + 41] : null; - $this->updated_at = ($row[$startcol + 42] !== null) ? (string) $row[$startcol + 42] : null; + $this->id = ($row[$startcol + 29] !== null) ? (int) $row[$startcol + 29] : null; + $this->name = ($row[$startcol + 30] !== null) ? (string) $row[$startcol + 30] : null; + $this->creator = ($row[$startcol + 31] !== null) ? (string) $row[$startcol + 31] : null; + $this->source = ($row[$startcol + 32] !== null) ? (string) $row[$startcol + 32] : null; + $this->owner_id = ($row[$startcol + 33] !== null) ? (int) $row[$startcol + 33] : null; + $this->description = ($row[$startcol + 34] !== null) ? (string) $row[$startcol + 34] : null; + $this->last_played = ($row[$startcol + 35] !== null) ? (string) $row[$startcol + 35] : null; + $this->play_count = ($row[$startcol + 36] !== null) ? (int) $row[$startcol + 36] : null; + $this->length = ($row[$startcol + 37] !== null) ? (string) $row[$startcol + 37] : null; + $this->mime = ($row[$startcol + 38] !== null) ? (string) $row[$startcol + 38] : null; + $this->created_at = ($row[$startcol + 39] !== null) ? (string) $row[$startcol + 39] : null; + $this->updated_at = ($row[$startcol + 40] !== null) ? (string) $row[$startcol + 40] : null; $this->resetModified(); $this->setNew(false); @@ -2013,7 +1907,7 @@ abstract class BaseAudioFile extends MediaItem implements Persistent } $this->postHydrate($row, $startcol, $rehydrate); - return $startcol + 43; // 43 = AudioFilePeer::NUM_HYDRATE_COLUMNS. + return $startcol + 41; // 41 = AudioFilePeer::NUM_HYDRATE_COLUMNS. } catch (Exception $e) { throw new PropelException("Error populating AudioFile object", $e); @@ -2365,12 +2259,6 @@ abstract class BaseAudioFile extends MediaItem implements Persistent if ($this->isColumnModified(AudioFilePeer::HIDDEN)) { $modifiedColumns[':p' . $index++] = '"hidden"'; } - if ($this->isColumnModified(AudioFilePeer::IS_SCHEDULED)) { - $modifiedColumns[':p' . $index++] = '"is_scheduled"'; - } - if ($this->isColumnModified(AudioFilePeer::IS_PLAYLIST)) { - $modifiedColumns[':p' . $index++] = '"is_playlist"'; - } if ($this->isColumnModified(AudioFilePeer::ID)) { $modifiedColumns[':p' . $index++] = '"id"'; } @@ -2505,12 +2393,6 @@ abstract class BaseAudioFile extends MediaItem implements Persistent case '"hidden"': $stmt->bindValue($identifier, $this->hidden, PDO::PARAM_BOOL); break; - case '"is_scheduled"': - $stmt->bindValue($identifier, $this->is_scheduled, PDO::PARAM_BOOL); - break; - case '"is_playlist"': - $stmt->bindValue($identifier, $this->is_playlist, PDO::PARAM_BOOL); - break; case '"id"': $stmt->bindValue($identifier, $this->id, PDO::PARAM_INT); break; @@ -2786,45 +2668,39 @@ abstract class BaseAudioFile extends MediaItem implements Persistent return $this->getFileHidden(); break; case 29: - return $this->getIsScheduled(); - break; - case 30: - return $this->getIsPlaylist(); - break; - case 31: return $this->getId(); break; - case 32: + case 30: return $this->getName(); break; - case 33: + case 31: return $this->getCreator(); break; - case 34: + case 32: return $this->getSource(); break; - case 35: + case 33: return $this->getOwnerId(); break; - case 36: + case 34: return $this->getDescription(); break; - case 37: + case 35: return $this->getLastPlayedTime(); break; - case 38: + case 36: return $this->getPlayCount(); break; - case 39: + case 37: return $this->getLength(); break; - case 40: + case 38: return $this->getMime(); break; - case 41: + case 39: return $this->getCreatedAt(); break; - case 42: + case 40: return $this->getUpdatedAt(); break; default: @@ -2885,20 +2761,18 @@ abstract class BaseAudioFile extends MediaItem implements Persistent $keys[26] => $this->getIsSilanChecked(), $keys[27] => $this->getFileExists(), $keys[28] => $this->getFileHidden(), - $keys[29] => $this->getIsScheduled(), - $keys[30] => $this->getIsPlaylist(), - $keys[31] => $this->getId(), - $keys[32] => $this->getName(), - $keys[33] => $this->getCreator(), - $keys[34] => $this->getSource(), - $keys[35] => $this->getOwnerId(), - $keys[36] => $this->getDescription(), - $keys[37] => $this->getLastPlayedTime(), - $keys[38] => $this->getPlayCount(), - $keys[39] => $this->getLength(), - $keys[40] => $this->getMime(), - $keys[41] => $this->getCreatedAt(), - $keys[42] => $this->getUpdatedAt(), + $keys[29] => $this->getId(), + $keys[30] => $this->getName(), + $keys[31] => $this->getCreator(), + $keys[32] => $this->getSource(), + $keys[33] => $this->getOwnerId(), + $keys[34] => $this->getDescription(), + $keys[35] => $this->getLastPlayedTime(), + $keys[36] => $this->getPlayCount(), + $keys[37] => $this->getLength(), + $keys[38] => $this->getMime(), + $keys[39] => $this->getCreatedAt(), + $keys[40] => $this->getUpdatedAt(), ); $virtualColumns = $this->virtualColumns; foreach ($virtualColumns as $key => $virtualColumn) { @@ -3037,45 +2911,39 @@ abstract class BaseAudioFile extends MediaItem implements Persistent $this->setFileHidden($value); break; case 29: - $this->setIsScheduled($value); - break; - case 30: - $this->setIsPlaylist($value); - break; - case 31: $this->setId($value); break; - case 32: + case 30: $this->setName($value); break; - case 33: + case 31: $this->setCreator($value); break; - case 34: + case 32: $this->setSource($value); break; - case 35: + case 33: $this->setOwnerId($value); break; - case 36: + case 34: $this->setDescription($value); break; - case 37: + case 35: $this->setLastPlayedTime($value); break; - case 38: + case 36: $this->setPlayCount($value); break; - case 39: + case 37: $this->setLength($value); break; - case 40: + case 38: $this->setMime($value); break; - case 41: + case 39: $this->setCreatedAt($value); break; - case 42: + case 40: $this->setUpdatedAt($value); break; } // switch() @@ -3131,20 +2999,18 @@ abstract class BaseAudioFile extends MediaItem implements Persistent if (array_key_exists($keys[26], $arr)) $this->setIsSilanChecked($arr[$keys[26]]); if (array_key_exists($keys[27], $arr)) $this->setFileExists($arr[$keys[27]]); if (array_key_exists($keys[28], $arr)) $this->setFileHidden($arr[$keys[28]]); - if (array_key_exists($keys[29], $arr)) $this->setIsScheduled($arr[$keys[29]]); - if (array_key_exists($keys[30], $arr)) $this->setIsPlaylist($arr[$keys[30]]); - if (array_key_exists($keys[31], $arr)) $this->setId($arr[$keys[31]]); - if (array_key_exists($keys[32], $arr)) $this->setName($arr[$keys[32]]); - if (array_key_exists($keys[33], $arr)) $this->setCreator($arr[$keys[33]]); - if (array_key_exists($keys[34], $arr)) $this->setSource($arr[$keys[34]]); - if (array_key_exists($keys[35], $arr)) $this->setOwnerId($arr[$keys[35]]); - if (array_key_exists($keys[36], $arr)) $this->setDescription($arr[$keys[36]]); - if (array_key_exists($keys[37], $arr)) $this->setLastPlayedTime($arr[$keys[37]]); - if (array_key_exists($keys[38], $arr)) $this->setPlayCount($arr[$keys[38]]); - if (array_key_exists($keys[39], $arr)) $this->setLength($arr[$keys[39]]); - if (array_key_exists($keys[40], $arr)) $this->setMime($arr[$keys[40]]); - if (array_key_exists($keys[41], $arr)) $this->setCreatedAt($arr[$keys[41]]); - if (array_key_exists($keys[42], $arr)) $this->setUpdatedAt($arr[$keys[42]]); + if (array_key_exists($keys[29], $arr)) $this->setId($arr[$keys[29]]); + if (array_key_exists($keys[30], $arr)) $this->setName($arr[$keys[30]]); + if (array_key_exists($keys[31], $arr)) $this->setCreator($arr[$keys[31]]); + if (array_key_exists($keys[32], $arr)) $this->setSource($arr[$keys[32]]); + if (array_key_exists($keys[33], $arr)) $this->setOwnerId($arr[$keys[33]]); + if (array_key_exists($keys[34], $arr)) $this->setDescription($arr[$keys[34]]); + if (array_key_exists($keys[35], $arr)) $this->setLastPlayedTime($arr[$keys[35]]); + if (array_key_exists($keys[36], $arr)) $this->setPlayCount($arr[$keys[36]]); + if (array_key_exists($keys[37], $arr)) $this->setLength($arr[$keys[37]]); + if (array_key_exists($keys[38], $arr)) $this->setMime($arr[$keys[38]]); + if (array_key_exists($keys[39], $arr)) $this->setCreatedAt($arr[$keys[39]]); + if (array_key_exists($keys[40], $arr)) $this->setUpdatedAt($arr[$keys[40]]); } /** @@ -3185,8 +3051,6 @@ abstract class BaseAudioFile extends MediaItem implements Persistent if ($this->isColumnModified(AudioFilePeer::SILAN_CHECK)) $criteria->add(AudioFilePeer::SILAN_CHECK, $this->silan_check); if ($this->isColumnModified(AudioFilePeer::FILE_EXISTS)) $criteria->add(AudioFilePeer::FILE_EXISTS, $this->file_exists); if ($this->isColumnModified(AudioFilePeer::HIDDEN)) $criteria->add(AudioFilePeer::HIDDEN, $this->hidden); - if ($this->isColumnModified(AudioFilePeer::IS_SCHEDULED)) $criteria->add(AudioFilePeer::IS_SCHEDULED, $this->is_scheduled); - if ($this->isColumnModified(AudioFilePeer::IS_PLAYLIST)) $criteria->add(AudioFilePeer::IS_PLAYLIST, $this->is_playlist); if ($this->isColumnModified(AudioFilePeer::ID)) $criteria->add(AudioFilePeer::ID, $this->id); if ($this->isColumnModified(AudioFilePeer::NAME)) $criteria->add(AudioFilePeer::NAME, $this->name); if ($this->isColumnModified(AudioFilePeer::CREATOR)) $criteria->add(AudioFilePeer::CREATOR, $this->creator); @@ -3291,8 +3155,6 @@ abstract class BaseAudioFile extends MediaItem implements Persistent $copyObj->setIsSilanChecked($this->getIsSilanChecked()); $copyObj->setFileExists($this->getFileExists()); $copyObj->setFileHidden($this->getFileHidden()); - $copyObj->setIsScheduled($this->getIsScheduled()); - $copyObj->setIsPlaylist($this->getIsPlaylist()); $copyObj->setName($this->getName()); $copyObj->setCreator($this->getCreator()); $copyObj->setSource($this->getSource()); @@ -3551,8 +3413,6 @@ abstract class BaseAudioFile extends MediaItem implements Persistent $this->silan_check = null; $this->file_exists = null; $this->hidden = null; - $this->is_scheduled = null; - $this->is_playlist = null; $this->id = null; $this->name = null; $this->creator = null; diff --git a/airtime_mvc/application/models/airtime/om/BaseAudioFilePeer.php b/airtime_mvc/application/models/airtime/om/BaseAudioFilePeer.php index 1eb0ffc16..b19db4b87 100644 --- a/airtime_mvc/application/models/airtime/om/BaseAudioFilePeer.php +++ b/airtime_mvc/application/models/airtime/om/BaseAudioFilePeer.php @@ -39,13 +39,13 @@ abstract class BaseAudioFilePeer extends MediaItemPeer const TM_CLASS = 'Airtime\\MediaItem\\map\\AudioFileTableMap'; /** The total number of columns. */ - const NUM_COLUMNS = 43; + const NUM_COLUMNS = 41; /** The number of lazy-loaded columns. */ const NUM_LAZY_LOAD_COLUMNS = 0; /** The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS) */ - const NUM_HYDRATE_COLUMNS = 43; + const NUM_HYDRATE_COLUMNS = 41; /** the column name for the directory field */ const DIRECTORY = 'media_audiofile.directory'; @@ -134,12 +134,6 @@ abstract class BaseAudioFilePeer extends MediaItemPeer /** the column name for the hidden field */ const HIDDEN = 'media_audiofile.hidden'; - /** the column name for the is_scheduled field */ - const IS_SCHEDULED = 'media_audiofile.is_scheduled'; - - /** the column name for the is_playlist field */ - const IS_PLAYLIST = 'media_audiofile.is_playlist'; - /** the column name for the id field */ const ID = 'media_audiofile.id'; @@ -195,12 +189,12 @@ abstract class BaseAudioFilePeer extends MediaItemPeer * e.g. AudioFilePeer::$fieldNames[AudioFilePeer::TYPE_PHPNAME][0] = 'Id' */ protected static $fieldNames = array ( - BasePeer::TYPE_PHPNAME => array ('Directory', 'Filepath', 'Md5', 'TrackTitle', 'ArtistName', 'BitRate', 'SampleRate', 'AlbumTitle', 'Genre', 'Comments', 'Year', 'TrackNumber', 'Channels', 'Bpm', 'EncodedBy', 'Mood', 'Label', 'Composer', 'Copyright', 'Conductor', 'IsrcNumber', 'InfoUrl', 'Language', 'ReplayGain', 'Cuein', 'Cueout', 'IsSilanChecked', 'FileExists', 'FileHidden', 'IsScheduled', 'IsPlaylist', 'Id', 'Name', 'Creator', 'Source', 'OwnerId', 'Description', 'LastPlayedTime', 'PlayCount', 'Length', 'Mime', 'CreatedAt', 'UpdatedAt', ), - BasePeer::TYPE_STUDLYPHPNAME => array ('directory', 'filepath', 'md5', 'trackTitle', 'artistName', 'bitRate', 'sampleRate', 'albumTitle', 'genre', 'comments', 'year', 'trackNumber', 'channels', 'bpm', 'encodedBy', 'mood', 'label', 'composer', 'copyright', 'conductor', 'isrcNumber', 'infoUrl', 'language', 'replayGain', 'cuein', 'cueout', 'isSilanChecked', 'fileExists', 'fileHidden', 'isScheduled', 'isPlaylist', 'id', 'name', 'creator', 'source', 'ownerId', 'description', 'lastPlayedTime', 'playCount', 'length', 'mime', 'createdAt', 'updatedAt', ), - BasePeer::TYPE_COLNAME => array (AudioFilePeer::DIRECTORY, AudioFilePeer::FILEPATH, AudioFilePeer::MD5, AudioFilePeer::TRACK_TITLE, AudioFilePeer::ARTIST_NAME, AudioFilePeer::BIT_RATE, AudioFilePeer::SAMPLE_RATE, AudioFilePeer::ALBUM_TITLE, AudioFilePeer::GENRE, AudioFilePeer::COMMENTS, AudioFilePeer::YEAR, AudioFilePeer::TRACK_NUMBER, AudioFilePeer::CHANNELS, AudioFilePeer::BPM, AudioFilePeer::ENCODED_BY, AudioFilePeer::MOOD, AudioFilePeer::LABEL, AudioFilePeer::COMPOSER, AudioFilePeer::COPYRIGHT, AudioFilePeer::CONDUCTOR, AudioFilePeer::ISRC_NUMBER, AudioFilePeer::INFO_URL, AudioFilePeer::LANGUAGE, AudioFilePeer::REPLAY_GAIN, AudioFilePeer::CUEIN, AudioFilePeer::CUEOUT, AudioFilePeer::SILAN_CHECK, AudioFilePeer::FILE_EXISTS, AudioFilePeer::HIDDEN, AudioFilePeer::IS_SCHEDULED, AudioFilePeer::IS_PLAYLIST, AudioFilePeer::ID, AudioFilePeer::NAME, AudioFilePeer::CREATOR, AudioFilePeer::SOURCE, AudioFilePeer::OWNER_ID, AudioFilePeer::DESCRIPTION, AudioFilePeer::LAST_PLAYED, AudioFilePeer::PLAY_COUNT, AudioFilePeer::LENGTH, AudioFilePeer::MIME, AudioFilePeer::CREATED_AT, AudioFilePeer::UPDATED_AT, ), - BasePeer::TYPE_RAW_COLNAME => array ('DIRECTORY', 'FILEPATH', 'MD5', 'TRACK_TITLE', 'ARTIST_NAME', 'BIT_RATE', 'SAMPLE_RATE', 'ALBUM_TITLE', 'GENRE', 'COMMENTS', 'YEAR', 'TRACK_NUMBER', 'CHANNELS', 'BPM', 'ENCODED_BY', 'MOOD', 'LABEL', 'COMPOSER', 'COPYRIGHT', 'CONDUCTOR', 'ISRC_NUMBER', 'INFO_URL', 'LANGUAGE', 'REPLAY_GAIN', 'CUEIN', 'CUEOUT', 'SILAN_CHECK', 'FILE_EXISTS', 'HIDDEN', 'IS_SCHEDULED', 'IS_PLAYLIST', 'ID', 'NAME', 'CREATOR', 'SOURCE', 'OWNER_ID', 'DESCRIPTION', 'LAST_PLAYED', 'PLAY_COUNT', 'LENGTH', 'MIME', 'CREATED_AT', 'UPDATED_AT', ), - BasePeer::TYPE_FIELDNAME => array ('directory', 'filepath', 'md5', 'track_title', 'artist_name', 'bit_rate', 'sample_rate', 'album_title', 'genre', 'comments', 'year', 'track_number', 'channels', 'bpm', 'encoded_by', 'mood', 'label', 'composer', 'copyright', 'conductor', 'isrc_number', 'info_url', 'language', 'replay_gain', 'cuein', 'cueout', 'silan_check', 'file_exists', 'hidden', 'is_scheduled', 'is_playlist', 'id', 'name', 'creator', 'source', 'owner_id', 'description', 'last_played', 'play_count', 'length', 'mime', 'created_at', 'updated_at', ), - BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, ) + BasePeer::TYPE_PHPNAME => array ('Directory', 'Filepath', 'Md5', 'TrackTitle', 'ArtistName', 'BitRate', 'SampleRate', 'AlbumTitle', 'Genre', 'Comments', 'Year', 'TrackNumber', 'Channels', 'Bpm', 'EncodedBy', 'Mood', 'Label', 'Composer', 'Copyright', 'Conductor', 'IsrcNumber', 'InfoUrl', 'Language', 'ReplayGain', 'Cuein', 'Cueout', 'IsSilanChecked', 'FileExists', 'FileHidden', 'Id', 'Name', 'Creator', 'Source', 'OwnerId', 'Description', 'LastPlayedTime', 'PlayCount', 'Length', 'Mime', 'CreatedAt', 'UpdatedAt', ), + BasePeer::TYPE_STUDLYPHPNAME => array ('directory', 'filepath', 'md5', 'trackTitle', 'artistName', 'bitRate', 'sampleRate', 'albumTitle', 'genre', 'comments', 'year', 'trackNumber', 'channels', 'bpm', 'encodedBy', 'mood', 'label', 'composer', 'copyright', 'conductor', 'isrcNumber', 'infoUrl', 'language', 'replayGain', 'cuein', 'cueout', 'isSilanChecked', 'fileExists', 'fileHidden', 'id', 'name', 'creator', 'source', 'ownerId', 'description', 'lastPlayedTime', 'playCount', 'length', 'mime', 'createdAt', 'updatedAt', ), + BasePeer::TYPE_COLNAME => array (AudioFilePeer::DIRECTORY, AudioFilePeer::FILEPATH, AudioFilePeer::MD5, AudioFilePeer::TRACK_TITLE, AudioFilePeer::ARTIST_NAME, AudioFilePeer::BIT_RATE, AudioFilePeer::SAMPLE_RATE, AudioFilePeer::ALBUM_TITLE, AudioFilePeer::GENRE, AudioFilePeer::COMMENTS, AudioFilePeer::YEAR, AudioFilePeer::TRACK_NUMBER, AudioFilePeer::CHANNELS, AudioFilePeer::BPM, AudioFilePeer::ENCODED_BY, AudioFilePeer::MOOD, AudioFilePeer::LABEL, AudioFilePeer::COMPOSER, AudioFilePeer::COPYRIGHT, AudioFilePeer::CONDUCTOR, AudioFilePeer::ISRC_NUMBER, AudioFilePeer::INFO_URL, AudioFilePeer::LANGUAGE, AudioFilePeer::REPLAY_GAIN, AudioFilePeer::CUEIN, AudioFilePeer::CUEOUT, AudioFilePeer::SILAN_CHECK, AudioFilePeer::FILE_EXISTS, AudioFilePeer::HIDDEN, AudioFilePeer::ID, AudioFilePeer::NAME, AudioFilePeer::CREATOR, AudioFilePeer::SOURCE, AudioFilePeer::OWNER_ID, AudioFilePeer::DESCRIPTION, AudioFilePeer::LAST_PLAYED, AudioFilePeer::PLAY_COUNT, AudioFilePeer::LENGTH, AudioFilePeer::MIME, AudioFilePeer::CREATED_AT, AudioFilePeer::UPDATED_AT, ), + BasePeer::TYPE_RAW_COLNAME => array ('DIRECTORY', 'FILEPATH', 'MD5', 'TRACK_TITLE', 'ARTIST_NAME', 'BIT_RATE', 'SAMPLE_RATE', 'ALBUM_TITLE', 'GENRE', 'COMMENTS', 'YEAR', 'TRACK_NUMBER', 'CHANNELS', 'BPM', 'ENCODED_BY', 'MOOD', 'LABEL', 'COMPOSER', 'COPYRIGHT', 'CONDUCTOR', 'ISRC_NUMBER', 'INFO_URL', 'LANGUAGE', 'REPLAY_GAIN', 'CUEIN', 'CUEOUT', 'SILAN_CHECK', 'FILE_EXISTS', 'HIDDEN', 'ID', 'NAME', 'CREATOR', 'SOURCE', 'OWNER_ID', 'DESCRIPTION', 'LAST_PLAYED', 'PLAY_COUNT', 'LENGTH', 'MIME', 'CREATED_AT', 'UPDATED_AT', ), + BasePeer::TYPE_FIELDNAME => array ('directory', 'filepath', 'md5', 'track_title', 'artist_name', 'bit_rate', 'sample_rate', 'album_title', 'genre', 'comments', 'year', 'track_number', 'channels', 'bpm', 'encoded_by', 'mood', 'label', 'composer', 'copyright', 'conductor', 'isrc_number', 'info_url', 'language', 'replay_gain', 'cuein', 'cueout', 'silan_check', 'file_exists', 'hidden', 'id', 'name', 'creator', 'source', 'owner_id', 'description', 'last_played', 'play_count', 'length', 'mime', 'created_at', 'updated_at', ), + BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, ) ); /** @@ -210,12 +204,12 @@ abstract class BaseAudioFilePeer extends MediaItemPeer * e.g. AudioFilePeer::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0 */ protected static $fieldKeys = array ( - BasePeer::TYPE_PHPNAME => array ('Directory' => 0, 'Filepath' => 1, 'Md5' => 2, 'TrackTitle' => 3, 'ArtistName' => 4, 'BitRate' => 5, 'SampleRate' => 6, 'AlbumTitle' => 7, 'Genre' => 8, 'Comments' => 9, 'Year' => 10, 'TrackNumber' => 11, 'Channels' => 12, 'Bpm' => 13, 'EncodedBy' => 14, 'Mood' => 15, 'Label' => 16, 'Composer' => 17, 'Copyright' => 18, 'Conductor' => 19, 'IsrcNumber' => 20, 'InfoUrl' => 21, 'Language' => 22, 'ReplayGain' => 23, 'Cuein' => 24, 'Cueout' => 25, 'IsSilanChecked' => 26, 'FileExists' => 27, 'FileHidden' => 28, 'IsScheduled' => 29, 'IsPlaylist' => 30, 'Id' => 31, 'Name' => 32, 'Creator' => 33, 'Source' => 34, 'OwnerId' => 35, 'Description' => 36, 'LastPlayedTime' => 37, 'PlayCount' => 38, 'Length' => 39, 'Mime' => 40, 'CreatedAt' => 41, 'UpdatedAt' => 42, ), - BasePeer::TYPE_STUDLYPHPNAME => array ('directory' => 0, 'filepath' => 1, 'md5' => 2, 'trackTitle' => 3, 'artistName' => 4, 'bitRate' => 5, 'sampleRate' => 6, 'albumTitle' => 7, 'genre' => 8, 'comments' => 9, 'year' => 10, 'trackNumber' => 11, 'channels' => 12, 'bpm' => 13, 'encodedBy' => 14, 'mood' => 15, 'label' => 16, 'composer' => 17, 'copyright' => 18, 'conductor' => 19, 'isrcNumber' => 20, 'infoUrl' => 21, 'language' => 22, 'replayGain' => 23, 'cuein' => 24, 'cueout' => 25, 'isSilanChecked' => 26, 'fileExists' => 27, 'fileHidden' => 28, 'isScheduled' => 29, 'isPlaylist' => 30, 'id' => 31, 'name' => 32, 'creator' => 33, 'source' => 34, 'ownerId' => 35, 'description' => 36, 'lastPlayedTime' => 37, 'playCount' => 38, 'length' => 39, 'mime' => 40, 'createdAt' => 41, 'updatedAt' => 42, ), - BasePeer::TYPE_COLNAME => array (AudioFilePeer::DIRECTORY => 0, AudioFilePeer::FILEPATH => 1, AudioFilePeer::MD5 => 2, AudioFilePeer::TRACK_TITLE => 3, AudioFilePeer::ARTIST_NAME => 4, AudioFilePeer::BIT_RATE => 5, AudioFilePeer::SAMPLE_RATE => 6, AudioFilePeer::ALBUM_TITLE => 7, AudioFilePeer::GENRE => 8, AudioFilePeer::COMMENTS => 9, AudioFilePeer::YEAR => 10, AudioFilePeer::TRACK_NUMBER => 11, AudioFilePeer::CHANNELS => 12, AudioFilePeer::BPM => 13, AudioFilePeer::ENCODED_BY => 14, AudioFilePeer::MOOD => 15, AudioFilePeer::LABEL => 16, AudioFilePeer::COMPOSER => 17, AudioFilePeer::COPYRIGHT => 18, AudioFilePeer::CONDUCTOR => 19, AudioFilePeer::ISRC_NUMBER => 20, AudioFilePeer::INFO_URL => 21, AudioFilePeer::LANGUAGE => 22, AudioFilePeer::REPLAY_GAIN => 23, AudioFilePeer::CUEIN => 24, AudioFilePeer::CUEOUT => 25, AudioFilePeer::SILAN_CHECK => 26, AudioFilePeer::FILE_EXISTS => 27, AudioFilePeer::HIDDEN => 28, AudioFilePeer::IS_SCHEDULED => 29, AudioFilePeer::IS_PLAYLIST => 30, AudioFilePeer::ID => 31, AudioFilePeer::NAME => 32, AudioFilePeer::CREATOR => 33, AudioFilePeer::SOURCE => 34, AudioFilePeer::OWNER_ID => 35, AudioFilePeer::DESCRIPTION => 36, AudioFilePeer::LAST_PLAYED => 37, AudioFilePeer::PLAY_COUNT => 38, AudioFilePeer::LENGTH => 39, AudioFilePeer::MIME => 40, AudioFilePeer::CREATED_AT => 41, AudioFilePeer::UPDATED_AT => 42, ), - BasePeer::TYPE_RAW_COLNAME => array ('DIRECTORY' => 0, 'FILEPATH' => 1, 'MD5' => 2, 'TRACK_TITLE' => 3, 'ARTIST_NAME' => 4, 'BIT_RATE' => 5, 'SAMPLE_RATE' => 6, 'ALBUM_TITLE' => 7, 'GENRE' => 8, 'COMMENTS' => 9, 'YEAR' => 10, 'TRACK_NUMBER' => 11, 'CHANNELS' => 12, 'BPM' => 13, 'ENCODED_BY' => 14, 'MOOD' => 15, 'LABEL' => 16, 'COMPOSER' => 17, 'COPYRIGHT' => 18, 'CONDUCTOR' => 19, 'ISRC_NUMBER' => 20, 'INFO_URL' => 21, 'LANGUAGE' => 22, 'REPLAY_GAIN' => 23, 'CUEIN' => 24, 'CUEOUT' => 25, 'SILAN_CHECK' => 26, 'FILE_EXISTS' => 27, 'HIDDEN' => 28, 'IS_SCHEDULED' => 29, 'IS_PLAYLIST' => 30, 'ID' => 31, 'NAME' => 32, 'CREATOR' => 33, 'SOURCE' => 34, 'OWNER_ID' => 35, 'DESCRIPTION' => 36, 'LAST_PLAYED' => 37, 'PLAY_COUNT' => 38, 'LENGTH' => 39, 'MIME' => 40, 'CREATED_AT' => 41, 'UPDATED_AT' => 42, ), - BasePeer::TYPE_FIELDNAME => array ('directory' => 0, 'filepath' => 1, 'md5' => 2, 'track_title' => 3, 'artist_name' => 4, 'bit_rate' => 5, 'sample_rate' => 6, 'album_title' => 7, 'genre' => 8, 'comments' => 9, 'year' => 10, 'track_number' => 11, 'channels' => 12, 'bpm' => 13, 'encoded_by' => 14, 'mood' => 15, 'label' => 16, 'composer' => 17, 'copyright' => 18, 'conductor' => 19, 'isrc_number' => 20, 'info_url' => 21, 'language' => 22, 'replay_gain' => 23, 'cuein' => 24, 'cueout' => 25, 'silan_check' => 26, 'file_exists' => 27, 'hidden' => 28, 'is_scheduled' => 29, 'is_playlist' => 30, 'id' => 31, 'name' => 32, 'creator' => 33, 'source' => 34, 'owner_id' => 35, 'description' => 36, 'last_played' => 37, 'play_count' => 38, 'length' => 39, 'mime' => 40, 'created_at' => 41, 'updated_at' => 42, ), - BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, ) + BasePeer::TYPE_PHPNAME => array ('Directory' => 0, 'Filepath' => 1, 'Md5' => 2, 'TrackTitle' => 3, 'ArtistName' => 4, 'BitRate' => 5, 'SampleRate' => 6, 'AlbumTitle' => 7, 'Genre' => 8, 'Comments' => 9, 'Year' => 10, 'TrackNumber' => 11, 'Channels' => 12, 'Bpm' => 13, 'EncodedBy' => 14, 'Mood' => 15, 'Label' => 16, 'Composer' => 17, 'Copyright' => 18, 'Conductor' => 19, 'IsrcNumber' => 20, 'InfoUrl' => 21, 'Language' => 22, 'ReplayGain' => 23, 'Cuein' => 24, 'Cueout' => 25, 'IsSilanChecked' => 26, 'FileExists' => 27, 'FileHidden' => 28, 'Id' => 29, 'Name' => 30, 'Creator' => 31, 'Source' => 32, 'OwnerId' => 33, 'Description' => 34, 'LastPlayedTime' => 35, 'PlayCount' => 36, 'Length' => 37, 'Mime' => 38, 'CreatedAt' => 39, 'UpdatedAt' => 40, ), + BasePeer::TYPE_STUDLYPHPNAME => array ('directory' => 0, 'filepath' => 1, 'md5' => 2, 'trackTitle' => 3, 'artistName' => 4, 'bitRate' => 5, 'sampleRate' => 6, 'albumTitle' => 7, 'genre' => 8, 'comments' => 9, 'year' => 10, 'trackNumber' => 11, 'channels' => 12, 'bpm' => 13, 'encodedBy' => 14, 'mood' => 15, 'label' => 16, 'composer' => 17, 'copyright' => 18, 'conductor' => 19, 'isrcNumber' => 20, 'infoUrl' => 21, 'language' => 22, 'replayGain' => 23, 'cuein' => 24, 'cueout' => 25, 'isSilanChecked' => 26, 'fileExists' => 27, 'fileHidden' => 28, 'id' => 29, 'name' => 30, 'creator' => 31, 'source' => 32, 'ownerId' => 33, 'description' => 34, 'lastPlayedTime' => 35, 'playCount' => 36, 'length' => 37, 'mime' => 38, 'createdAt' => 39, 'updatedAt' => 40, ), + BasePeer::TYPE_COLNAME => array (AudioFilePeer::DIRECTORY => 0, AudioFilePeer::FILEPATH => 1, AudioFilePeer::MD5 => 2, AudioFilePeer::TRACK_TITLE => 3, AudioFilePeer::ARTIST_NAME => 4, AudioFilePeer::BIT_RATE => 5, AudioFilePeer::SAMPLE_RATE => 6, AudioFilePeer::ALBUM_TITLE => 7, AudioFilePeer::GENRE => 8, AudioFilePeer::COMMENTS => 9, AudioFilePeer::YEAR => 10, AudioFilePeer::TRACK_NUMBER => 11, AudioFilePeer::CHANNELS => 12, AudioFilePeer::BPM => 13, AudioFilePeer::ENCODED_BY => 14, AudioFilePeer::MOOD => 15, AudioFilePeer::LABEL => 16, AudioFilePeer::COMPOSER => 17, AudioFilePeer::COPYRIGHT => 18, AudioFilePeer::CONDUCTOR => 19, AudioFilePeer::ISRC_NUMBER => 20, AudioFilePeer::INFO_URL => 21, AudioFilePeer::LANGUAGE => 22, AudioFilePeer::REPLAY_GAIN => 23, AudioFilePeer::CUEIN => 24, AudioFilePeer::CUEOUT => 25, AudioFilePeer::SILAN_CHECK => 26, AudioFilePeer::FILE_EXISTS => 27, AudioFilePeer::HIDDEN => 28, AudioFilePeer::ID => 29, AudioFilePeer::NAME => 30, AudioFilePeer::CREATOR => 31, AudioFilePeer::SOURCE => 32, AudioFilePeer::OWNER_ID => 33, AudioFilePeer::DESCRIPTION => 34, AudioFilePeer::LAST_PLAYED => 35, AudioFilePeer::PLAY_COUNT => 36, AudioFilePeer::LENGTH => 37, AudioFilePeer::MIME => 38, AudioFilePeer::CREATED_AT => 39, AudioFilePeer::UPDATED_AT => 40, ), + BasePeer::TYPE_RAW_COLNAME => array ('DIRECTORY' => 0, 'FILEPATH' => 1, 'MD5' => 2, 'TRACK_TITLE' => 3, 'ARTIST_NAME' => 4, 'BIT_RATE' => 5, 'SAMPLE_RATE' => 6, 'ALBUM_TITLE' => 7, 'GENRE' => 8, 'COMMENTS' => 9, 'YEAR' => 10, 'TRACK_NUMBER' => 11, 'CHANNELS' => 12, 'BPM' => 13, 'ENCODED_BY' => 14, 'MOOD' => 15, 'LABEL' => 16, 'COMPOSER' => 17, 'COPYRIGHT' => 18, 'CONDUCTOR' => 19, 'ISRC_NUMBER' => 20, 'INFO_URL' => 21, 'LANGUAGE' => 22, 'REPLAY_GAIN' => 23, 'CUEIN' => 24, 'CUEOUT' => 25, 'SILAN_CHECK' => 26, 'FILE_EXISTS' => 27, 'HIDDEN' => 28, 'ID' => 29, 'NAME' => 30, 'CREATOR' => 31, 'SOURCE' => 32, 'OWNER_ID' => 33, 'DESCRIPTION' => 34, 'LAST_PLAYED' => 35, 'PLAY_COUNT' => 36, 'LENGTH' => 37, 'MIME' => 38, 'CREATED_AT' => 39, 'UPDATED_AT' => 40, ), + BasePeer::TYPE_FIELDNAME => array ('directory' => 0, 'filepath' => 1, 'md5' => 2, 'track_title' => 3, 'artist_name' => 4, 'bit_rate' => 5, 'sample_rate' => 6, 'album_title' => 7, 'genre' => 8, 'comments' => 9, 'year' => 10, 'track_number' => 11, 'channels' => 12, 'bpm' => 13, 'encoded_by' => 14, 'mood' => 15, 'label' => 16, 'composer' => 17, 'copyright' => 18, 'conductor' => 19, 'isrc_number' => 20, 'info_url' => 21, 'language' => 22, 'replay_gain' => 23, 'cuein' => 24, 'cueout' => 25, 'silan_check' => 26, 'file_exists' => 27, 'hidden' => 28, 'id' => 29, 'name' => 30, 'creator' => 31, 'source' => 32, 'owner_id' => 33, 'description' => 34, 'last_played' => 35, 'play_count' => 36, 'length' => 37, 'mime' => 38, 'created_at' => 39, 'updated_at' => 40, ), + BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, ) ); /** @@ -318,8 +312,6 @@ abstract class BaseAudioFilePeer extends MediaItemPeer $criteria->addSelectColumn(AudioFilePeer::SILAN_CHECK); $criteria->addSelectColumn(AudioFilePeer::FILE_EXISTS); $criteria->addSelectColumn(AudioFilePeer::HIDDEN); - $criteria->addSelectColumn(AudioFilePeer::IS_SCHEDULED); - $criteria->addSelectColumn(AudioFilePeer::IS_PLAYLIST); $criteria->addSelectColumn(AudioFilePeer::ID); $criteria->addSelectColumn(AudioFilePeer::NAME); $criteria->addSelectColumn(AudioFilePeer::CREATOR); @@ -362,8 +354,6 @@ abstract class BaseAudioFilePeer extends MediaItemPeer $criteria->addSelectColumn($alias . '.silan_check'); $criteria->addSelectColumn($alias . '.file_exists'); $criteria->addSelectColumn($alias . '.hidden'); - $criteria->addSelectColumn($alias . '.is_scheduled'); - $criteria->addSelectColumn($alias . '.is_playlist'); $criteria->addSelectColumn($alias . '.id'); $criteria->addSelectColumn($alias . '.name'); $criteria->addSelectColumn($alias . '.creator'); @@ -595,11 +585,11 @@ abstract class BaseAudioFilePeer extends MediaItemPeer public static function getPrimaryKeyHashFromRow($row, $startcol = 0) { // If the PK cannot be derived from the row, return null. - if ($row[$startcol + 31] === null) { + if ($row[$startcol + 29] === null) { return null; } - return (string) $row[$startcol + 31]; + return (string) $row[$startcol + 29]; } /** @@ -614,7 +604,7 @@ abstract class BaseAudioFilePeer extends MediaItemPeer public static function getPrimaryKeyFromRow($row, $startcol = 0) { - return (int) $row[$startcol + 31]; + return (int) $row[$startcol + 29]; } /** diff --git a/airtime_mvc/application/models/airtime/om/BaseAudioFileQuery.php b/airtime_mvc/application/models/airtime/om/BaseAudioFileQuery.php index 06bd37e01..382a3c469 100644 --- a/airtime_mvc/application/models/airtime/om/BaseAudioFileQuery.php +++ b/airtime_mvc/application/models/airtime/om/BaseAudioFileQuery.php @@ -53,8 +53,6 @@ use Airtime\MediaItem\AudioFileQuery; * @method AudioFileQuery orderByIsSilanChecked($order = Criteria::ASC) Order by the silan_check column * @method AudioFileQuery orderByFileExists($order = Criteria::ASC) Order by the file_exists column * @method AudioFileQuery orderByFileHidden($order = Criteria::ASC) Order by the hidden column - * @method AudioFileQuery orderByIsScheduled($order = Criteria::ASC) Order by the is_scheduled column - * @method AudioFileQuery orderByIsPlaylist($order = Criteria::ASC) Order by the is_playlist column * @method AudioFileQuery orderById($order = Criteria::ASC) Order by the id column * @method AudioFileQuery orderByName($order = Criteria::ASC) Order by the name column * @method AudioFileQuery orderByCreator($order = Criteria::ASC) Order by the creator column @@ -97,8 +95,6 @@ use Airtime\MediaItem\AudioFileQuery; * @method AudioFileQuery groupByIsSilanChecked() Group by the silan_check column * @method AudioFileQuery groupByFileExists() Group by the file_exists column * @method AudioFileQuery groupByFileHidden() Group by the hidden column - * @method AudioFileQuery groupByIsScheduled() Group by the is_scheduled column - * @method AudioFileQuery groupByIsPlaylist() Group by the is_playlist column * @method AudioFileQuery groupById() Group by the id column * @method AudioFileQuery groupByName() Group by the name column * @method AudioFileQuery groupByCreator() Group by the creator column @@ -160,8 +156,6 @@ use Airtime\MediaItem\AudioFileQuery; * @method AudioFile findOneByIsSilanChecked(boolean $silan_check) Return the first AudioFile filtered by the silan_check column * @method AudioFile findOneByFileExists(boolean $file_exists) Return the first AudioFile filtered by the file_exists column * @method AudioFile findOneByFileHidden(boolean $hidden) Return the first AudioFile filtered by the hidden column - * @method AudioFile findOneByIsScheduled(boolean $is_scheduled) Return the first AudioFile filtered by the is_scheduled column - * @method AudioFile findOneByIsPlaylist(boolean $is_playlist) Return the first AudioFile filtered by the is_playlist column * @method AudioFile findOneByName(string $name) Return the first AudioFile filtered by the name column * @method AudioFile findOneByCreator(string $creator) Return the first AudioFile filtered by the creator column * @method AudioFile findOneBySource(string $source) Return the first AudioFile filtered by the source column @@ -203,8 +197,6 @@ use Airtime\MediaItem\AudioFileQuery; * @method array findByIsSilanChecked(boolean $silan_check) Return AudioFile objects filtered by the silan_check column * @method array findByFileExists(boolean $file_exists) Return AudioFile objects filtered by the file_exists column * @method array findByFileHidden(boolean $hidden) Return AudioFile objects filtered by the hidden column - * @method array findByIsScheduled(boolean $is_scheduled) Return AudioFile objects filtered by the is_scheduled column - * @method array findByIsPlaylist(boolean $is_playlist) Return AudioFile objects filtered by the is_playlist column * @method array findById(int $id) Return AudioFile objects filtered by the id column * @method array findByName(string $name) Return AudioFile objects filtered by the name column * @method array findByCreator(string $creator) Return AudioFile objects filtered by the creator column @@ -324,7 +316,7 @@ abstract class BaseAudioFileQuery extends MediaItemQuery */ protected function findPkSimple($key, $con) { - $sql = 'SELECT "directory", "filepath", "md5", "track_title", "artist_name", "bit_rate", "sample_rate", "album_title", "genre", "comments", "year", "track_number", "channels", "bpm", "encoded_by", "mood", "label", "composer", "copyright", "conductor", "isrc_number", "info_url", "language", "replay_gain", "cuein", "cueout", "silan_check", "file_exists", "hidden", "is_scheduled", "is_playlist", "id", "name", "creator", "source", "owner_id", "description", "last_played", "play_count", "length", "mime", "created_at", "updated_at" FROM "media_audiofile" WHERE "id" = :p0'; + $sql = 'SELECT "directory", "filepath", "md5", "track_title", "artist_name", "bit_rate", "sample_rate", "album_title", "genre", "comments", "year", "track_number", "channels", "bpm", "encoded_by", "mood", "label", "composer", "copyright", "conductor", "isrc_number", "info_url", "language", "replay_gain", "cuein", "cueout", "silan_check", "file_exists", "hidden", "id", "name", "creator", "source", "owner_id", "description", "last_played", "play_count", "length", "mime", "created_at", "updated_at" FROM "media_audiofile" WHERE "id" = :p0'; try { $stmt = $con->prepare($sql); $stmt->bindValue(':p0', $key, PDO::PARAM_INT); @@ -1354,60 +1346,6 @@ abstract class BaseAudioFileQuery extends MediaItemQuery return $this->addUsingAlias(AudioFilePeer::HIDDEN, $fileHidden, $comparison); } - /** - * Filter the query on the is_scheduled column - * - * Example usage: - * - * $query->filterByIsScheduled(true); // WHERE is_scheduled = true - * $query->filterByIsScheduled('yes'); // WHERE is_scheduled = true - * - * - * @param boolean|string $isScheduled The value to use as filter. - * Non-boolean arguments are converted using the following rules: - * * 1, '1', 'true', 'on', and 'yes' are converted to boolean true - * * 0, '0', 'false', 'off', and 'no' are converted to boolean false - * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL - * - * @return AudioFileQuery The current query, for fluid interface - */ - public function filterByIsScheduled($isScheduled = null, $comparison = null) - { - if (is_string($isScheduled)) { - $isScheduled = in_array(strtolower($isScheduled), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true; - } - - return $this->addUsingAlias(AudioFilePeer::IS_SCHEDULED, $isScheduled, $comparison); - } - - /** - * Filter the query on the is_playlist column - * - * Example usage: - * - * $query->filterByIsPlaylist(true); // WHERE is_playlist = true - * $query->filterByIsPlaylist('yes'); // WHERE is_playlist = true - * - * - * @param boolean|string $isPlaylist The value to use as filter. - * Non-boolean arguments are converted using the following rules: - * * 1, '1', 'true', 'on', and 'yes' are converted to boolean true - * * 0, '0', 'false', 'off', and 'no' are converted to boolean false - * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). - * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL - * - * @return AudioFileQuery The current query, for fluid interface - */ - public function filterByIsPlaylist($isPlaylist = null, $comparison = null) - { - if (is_string($isPlaylist)) { - $isPlaylist = in_array(strtolower($isPlaylist), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true; - } - - return $this->addUsingAlias(AudioFilePeer::IS_PLAYLIST, $isPlaylist, $comparison); - } - /** * Filter the query on the id column * diff --git a/airtime_mvc/application/services/DatatableAudioFileService.php b/airtime_mvc/application/services/DatatableAudioFileService.php index 1cc606402..51294d5f4 100644 --- a/airtime_mvc/application/services/DatatableAudioFileService.php +++ b/airtime_mvc/application/services/DatatableAudioFileService.php @@ -15,8 +15,6 @@ class Application_Service_DatatableAudioFileService extends Application_Service_ protected $columns; protected $order = array ( - "IsScheduled", - "IsPlaylist", "TrackTitle", "ArtistName", "AlbumTitle", @@ -74,26 +72,6 @@ class Application_Service_DatatableAudioFileService extends Application_Service_ "type" => null ) ), - "IsScheduled" => array( - "isColumn" => true, - "title" => _("Scheduled"), - "width" => "90px", - "class" => "library_is_scheduled", - "searchable" => false, - "advancedSearch" => array( - "type" => "checkbox" - ) - ), - "IsPlaylist" => array( - "isColumn" => true, - "title" => _("Playlist"), - "width" => "90px", - "class" => "library_is_playlist", - "searchable" => false, - "advancedSearch" => array( - "type" => "checkbox" - ) - ), "TrackTitle" => array( "isColumn" => true, "title" => _("Title"), diff --git a/airtime_mvc/build/schema.xml b/airtime_mvc/build/schema.xml index a289aa66d..7cadb55c8 100644 --- a/airtime_mvc/build/schema.xml +++ b/airtime_mvc/build/schema.xml @@ -354,8 +354,6 @@ - - diff --git a/airtime_mvc/build/sql/schema.sql b/airtime_mvc/build/sql/schema.sql index d812cad2c..1c01c9ec9 100644 --- a/airtime_mvc/build/sql/schema.sql +++ b/airtime_mvc/build/sql/schema.sql @@ -478,8 +478,6 @@ CREATE TABLE "media_audiofile" "silan_check" BOOLEAN DEFAULT 'f', "file_exists" BOOLEAN DEFAULT 't', "hidden" BOOLEAN DEFAULT 'f', - "is_scheduled" BOOLEAN DEFAULT 'f', - "is_playlist" BOOLEAN DEFAULT 'f', "id" INTEGER NOT NULL, "name" VARCHAR(512), "creator" VARCHAR(512),