diff --git a/airtime_mvc/application/controllers/LibraryController.php b/airtime_mvc/application/controllers/LibraryController.php index f0b72099d..af40b2353 100644 --- a/airtime_mvc/application/controllers/LibraryController.php +++ b/airtime_mvc/application/controllers/LibraryController.php @@ -11,6 +11,7 @@ class LibraryController extends Zend_Controller_Action $ajaxContext = $this->_helper->getHelper('AjaxContext'); $ajaxContext->addActionContext('contents', 'json') ->addActionContext('delete', 'json') + ->addActionContext('delete-group', 'json') ->addActionContext('context-menu', 'json') ->addActionContext('get-file-meta-data', 'html') ->addActionContext('upload-file-soundcloud', 'json') @@ -31,12 +32,16 @@ class LibraryController extends Zend_Controller_Action $this->view->headScript()->appendFile($baseUrl.'/js/datatables/js/jquery.dataTables.js','text/javascript'); $this->view->headScript()->appendFile($baseUrl.'/js/datatables/plugin/dataTables.pluginAPI.js','text/javascript'); $this->view->headScript()->appendFile($baseUrl.'/js/datatables/plugin/dataTables.fnSetFilteringDelay.js','text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'/js/datatables/plugin/dataTables.ColVis.js','text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'/js/datatables/plugin/dataTables.ColReorder.js','text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'/js/datatables/plugin/dataTables.FixedColumns.js','text/javascript'); $this->view->headScript()->appendFile($baseUrl.'/js/airtime/library/library.js','text/javascript'); $this->view->headScript()->appendFile($baseUrl.'/js/airtime/library/advancedsearch.js','text/javascript'); $this->view->headLink()->appendStylesheet($baseUrl.'/css/media_library.css'); $this->view->headLink()->appendStylesheet($baseUrl.'/css/contextmenu.css'); - + $this->view->headLink()->appendStylesheet($baseUrl.'/css/datatables/css/ColVis.css'); + $this->view->headLink()->appendStylesheet($baseUrl.'/css/datatables/css/ColReorder.css'); $this->_helper->layout->setLayout('library'); $this->_helper->viewRenderer->setResponseSegment('library'); @@ -178,27 +183,67 @@ class LibraryController extends Zend_Controller_Action $this->view->id = $id; } } + + public function deleteGroupAction() + { + $ids = $this->_getParam('ids'); + $userInfo = Zend_Auth::getInstance()->getStorage()->read(); + $user = new Application_Model_User($userInfo->id); + + if ($user->isAdmin()) { + + if (!is_null($ids)) { + foreach ($ids as $key => $id) { + $file = Application_Model_StoredFile::Recall($id); + + if (PEAR::isError($file)) { + $this->view->message = $file->getMessage(); + return; + } + else if(is_null($file)) { + $this->view->message = "file doesn't exist"; + return; + } + + $res = $file->delete(); + + if (PEAR::isError($res)) { + $this->view->message = $res->getMessage(); + return; + } + else { + $res = settype($res, "integer"); + $data = array("filepath" => $file->getFilePath(), "delete" => $res); + Application_Model_RabbitMq::SendMessageToMediaMonitor("file_delete", $data); + } + } + + $this->view->ids = $ids; + } + } + } public function contentsAction() { $post = $this->getRequest()->getPost(); + Logging::log(print_r($post, true)); $datatables = Application_Model_StoredFile::searchFilesForPlaylistBuilder($post); - + //format clip lengh to 1 decimal foreach($datatables["aaData"] as &$data){ - if($data[6] == 'audioclip'){ - $file = Application_Model_StoredFile::Recall($data[0]); + if($data['ftype'] == 'audioclip'){ + $file = Application_Model_StoredFile::Recall($data['id']); $scid = $file->getSoundCloudId(); if($scid == "-2"){ - $data[1] .= ''; + $data['track_title'] .= ''; }else if($scid == "-3"){ - $data[1] .= ''; + $data['track_title'] .= ''; }else if(!is_null($scid)){ - $data[1] .= ''; + $data['track_title'] .= ''; } } - $sec = Application_Model_Playlist::playlistTimeToSeconds($data[5]); - $data[5] = Application_Model_Playlist::secondsToPlaylistTime($sec); + $sec = Application_Model_Playlist::playlistTimeToSeconds($data['length']); + $data['length'] = Application_Model_Playlist::secondsToPlaylistTime($sec); } die(json_encode($datatables)); diff --git a/airtime_mvc/application/controllers/PlaylistController.php b/airtime_mvc/application/controllers/PlaylistController.php index 9c3bc11ec..7618d94c9 100644 --- a/airtime_mvc/application/controllers/PlaylistController.php +++ b/airtime_mvc/application/controllers/PlaylistController.php @@ -8,18 +8,20 @@ class PlaylistController extends Zend_Controller_Action { $ajaxContext = $this->_helper->getHelper('AjaxContext'); $ajaxContext->addActionContext('add-item', 'json') - ->addActionContext('delete-item', 'json') - ->addActionContext('set-fade', 'json') - ->addActionContext('set-cue', 'json') - ->addActionContext('move-item', 'json') - ->addActionContext('close', 'json') - ->addActionContext('new', 'json') - ->addActionContext('edit', 'json') - ->addActionContext('delete-active', 'json') - ->addActionContext('delete', 'json') + ->addActionContext('delete-item', 'json') + ->addActionContext('add-group', 'json') + ->addActionContext('delete-group', 'json') + ->addActionContext('set-fade', 'json') + ->addActionContext('set-cue', 'json') + ->addActionContext('move-item', 'json') + ->addActionContext('close', 'json') + ->addActionContext('new', 'json') + ->addActionContext('edit', 'json') + ->addActionContext('delete-active', 'json') + ->addActionContext('delete', 'json') ->addActionContext('set-playlist-fades', 'json') ->addActionContext('set-playlist-name', 'json') - ->addActionContext('set-playlist-description', 'json') + ->addActionContext('set-playlist-description', 'json') ->initContext(); $this->pl_sess = new Zend_Session_Namespace(UI_PLAYLIST_SESSNAME); @@ -209,6 +211,59 @@ class PlaylistController extends Zend_Controller_Action unset($this->view->pl); } + public function addGroupAction() + { + $ids = $this->_getParam('ids'); + $pos = $this->_getParam('pos', null); + + if (!is_null($ids)) { + $pl = $this->getPlaylist(); + if ($pl === false) { + $this->view->playlist_error = true; + return false; + } + + foreach ($ids as $key => $value) { + $res = $pl->addAudioClip($value); + if (PEAR::isError($res)) { + $this->view->message = $res->getMessage(); + break; + } + } + + $this->view->pl = $pl; + $this->view->html = $this->view->render('playlist/update.phtml'); + $this->view->name = $pl->getName(); + $this->view->length = $pl->getLength(); + $this->view->description = $pl->getDescription(); + return; + } + $this->view->message = "a file is not chosen"; + } + + public function deleteGroupAction() + { + $ids = $this->_getParam('ids', null); + + foreach ($ids as $key => $id) { + $pl = Application_Model_Playlist::Recall($id); + + if ($pl !== FALSE) { + Application_Model_Playlist::Delete($id); + $pl_sess = $this->pl_sess; + if($pl_sess->id === $id){ + unset($pl_sess->id); + } + } else { + $this->view->playlist_error = true; + return false; + } + } + + $this->view->ids = $ids; + $this->view->html = $this->view->render('playlist/index.phtml'); + } + public function setCueAction() { $pos = $this->_getParam('pos'); diff --git a/airtime_mvc/application/models/Playlist.php b/airtime_mvc/application/models/Playlist.php index 09232a15e..98d6aaa06 100644 --- a/airtime_mvc/application/models/Playlist.php +++ b/airtime_mvc/application/models/Playlist.php @@ -443,7 +443,8 @@ class Application_Model_Playlist { $pl = new CcPlaylist(); $pl->setDbName($this->name); $pl->setDbState("incomplete"); - $pl->setDbMtime(new DateTime("now", new DateTimeZone("UTC"))); + $pl->setDbMtime(new DateTime("now"), new DateTimeZone("UTC")); + $pl->setDbUtime(new DateTime("now"), new DateTimeZone("UTC")); $pl->save(); $this->id = $pl->getDbId(); @@ -534,6 +535,10 @@ class Application_Model_Playlist { $res = $this->insertPlaylistElement($this->id, $p_mediaId, $p_position, $p_cliplength, $p_cuein, $p_cueout, $p_fadeIn, $p_fadeOut); + $pl = CcPlaylistQuery::create()->findPK($this->id); + $pl->setDbMtime(new DateTime("now"), new DateTimeZone("UTC")); + $pl->save(); + return TRUE; } @@ -559,6 +564,11 @@ class Application_Model_Playlist { return FALSE; $row->delete(); + + $pl = CcPlaylistQuery::create()->findPK($this->id); + $pl->setDbMtime(new DateTime("now"), new DateTimeZone("UTC")); + $pl->save(); + return $row; } @@ -584,6 +594,10 @@ class Application_Model_Playlist { if($res !== TRUE) return FALSE; + $pl = CcPlaylistQuery::create()->findPK($this->id); + $pl->setDbMtime(new DateTime("now"), new DateTimeZone("UTC")); + $pl->save(); + return TRUE; } diff --git a/airtime_mvc/application/models/StoredFile.php b/airtime_mvc/application/models/StoredFile.php index 95e99556f..b5dd3d5c5 100644 --- a/airtime_mvc/application/models/StoredFile.php +++ b/airtime_mvc/application/models/StoredFile.php @@ -90,6 +90,9 @@ class Application_Model_StoredFile { } $this->setDbColMetadata($dbMd); } + + $this->_file->setDbMtime(new DateTime("now"), new DateTimeZone("UTC")); + $this->_file->save(); } /** @@ -120,6 +123,7 @@ class Application_Model_StoredFile { } } + $this->_file->setDbMtime(new DateTime("now"), new DateTimeZone("UTC")); $this->_file->save(); } @@ -494,6 +498,8 @@ class Application_Model_StoredFile { { $file = new CcFiles(); $file->setDbGunid(md5(uniqid("", true))); + $file->setDbUtime(new DateTime("now"), new DateTimeZone("UTC")); + $file->setDbMtime(new DateTime("now"), new DateTimeZone("UTC")); $storedFile = new Application_Model_StoredFile(); $storedFile->_file = $file; @@ -636,50 +642,53 @@ class Application_Model_StoredFile { return $res; } - public static function searchFilesForPlaylistBuilder($datatables) { - global $CC_CONFIG; + public static function searchFilesForPlaylistBuilder($datatables) + { + global $CC_CONFIG; - $displayData = array("track_title", "artist_name", "album_title", "genre", "length", "ftype"); + $displayData = array("track_title", "artist_name", "album_title", "genre", "length", "year", "utime", "mtime", "ftype"); - $plSelect = "SELECT "; + $plSelect = "SELECT "; $fileSelect = "SELECT "; - foreach ($displayData as $key){ + foreach ($displayData as $key) { - if($key === "track_title"){ + if ($key === "track_title") { $plSelect .= "name AS ".$key.", "; $fileSelect .= $key.", "; - } - else if ($key === "ftype"){ + } else if ($key === "ftype") { $plSelect .= "'playlist' AS ".$key.", "; $fileSelect .= $key.", "; - } - else if ($key === "artist_name"){ + } else if ($key === "artist_name") { $plSelect .= "creator AS ".$key.", "; $fileSelect .= $key.", "; - } - else if ($key === "length"){ + } else if ($key === "length") { $plSelect .= $key.", "; $fileSelect .= $key.", "; - } - else { + } else if ($key === "year") { + $plSelect .= "CAST(utime AS varchar) AS ".$key.", "; + $fileSelect .= $key.", "; + } else if ($key === "utime") { + $plSelect .= $key.", "; + $fileSelect .= $key.", "; + } else if ($key === "mtime") { + $plSelect .= $key.", "; + $fileSelect .= $key.", "; + } else { $plSelect .= "NULL AS ".$key.", "; $fileSelect .= $key.", "; } } - $fromTable = " ((".$plSelect."PL.id - FROM ".$CC_CONFIG["playListTable"]." AS PL - LEFT JOIN ".$CC_CONFIG['playListTimeView']." AS PLT USING(id)) + $fromTable = " ((".$plSelect."PL.id + FROM ".$CC_CONFIG["playListTable"]." AS PL + LEFT JOIN ".$CC_CONFIG['playListTimeView']." AS PLT USING(id)) + UNION + (".$fileSelect."id FROM ".$CC_CONFIG["filesTable"]." AS FILES WHERE file_exist = 'TRUE')) AS RESULTS"; + + return Application_Model_StoredFile::searchFiles($fromTable, $datatables); + } - UNION - - (".$fileSelect."id FROM ".$CC_CONFIG["filesTable"]." AS FILES WHERE file_exist = 'TRUE')) AS RESULTS"; - - return Application_Model_StoredFile::searchFiles($fromTable, $datatables); - - } - - public static function searchPlaylistsForSchedule($datatables) + public static function searchPlaylistsForSchedule($datatables) { $fromTable = "cc_playlist AS pl LEFT JOIN cc_playlisttimes AS plt USING(id) LEFT JOIN cc_subjs AS sub ON pl.editedby = sub.id"; //$datatables["optWhere"][] = "INTERVAL '{$time_remaining}' > INTERVAL '00:00:00'"; @@ -698,7 +707,12 @@ class Application_Model_StoredFile { $searchTerms = explode(" ", $data["sSearch"]); $selectorCount = "SELECT COUNT(*)"; - $selectorRows = "SELECT ". join("," , $columnsDisplayed); + foreach( $columnsDisplayed as $key=>$col){ + if($col == ''){ + unset($columnsDisplayed[$key]); + } + } + $selectorRows = "SELECT " . join(',', $columnsDisplayed ); $sql = $selectorCount." FROM ".$fromTable; $totalRows = $CC_DBC->getOne($sql); @@ -741,7 +755,7 @@ class Application_Model_StoredFile { // End Order By clause //ordered by integer as expected by datatables. - $CC_DBC->setFetchMode(DB_FETCHMODE_ORDERED); + //$CC_DBC->setFetchMode(DB_FETCHMODE_ORDERED); if(isset($where)) { $where = join(" AND ", $where); @@ -754,6 +768,18 @@ class Application_Model_StoredFile { } $results = $CC_DBC->getAll($sql); + foreach($results as &$row){ + // add checkbox row + $row['checkbox'] = ""; + + // a full timestamp is being returned for playlists' year column; + // split it and grab only the year info + $yearSplit = explode('-', $row['year']); + $row['year'] = $yearSplit[0]; + } + //$results['checkbox'] + //$results = $CC_DBC->getAssoc($sql); + Logging::log(print_r($results, true)); //echo $results; //echo $sql; diff --git a/airtime_mvc/application/models/airtime/map/CcFilesTableMap.php b/airtime_mvc/application/models/airtime/map/CcFilesTableMap.php index e10bd9fab..d311e7865 100644 --- a/airtime_mvc/application/models/airtime/map/CcFilesTableMap.php +++ b/airtime_mvc/application/models/airtime/map/CcFilesTableMap.php @@ -49,6 +49,8 @@ class CcFilesTableMap extends TableMap { $this->addColumn('CURRENTLYACCESSING', 'DbCurrentlyaccessing', 'INTEGER', true, null, 0); $this->addForeignKey('EDITEDBY', 'DbEditedby', 'INTEGER', 'cc_subjs', 'ID', false, null, null); $this->addColumn('MTIME', 'DbMtime', 'TIMESTAMP', false, 6, null); + $this->addColumn('UTIME', 'DbUtime', 'TIMESTAMP', false, 6, null); + $this->addColumn('LPTIME', 'DbLPtime', 'TIMESTAMP', false, 6, null); $this->addColumn('MD5', 'DbMd5', 'CHAR', false, 32, null); $this->addColumn('TRACK_TITLE', 'DbTrackTitle', 'VARCHAR', false, 512, null); $this->addColumn('ARTIST_NAME', 'DbArtistName', 'VARCHAR', false, 512, null); diff --git a/airtime_mvc/application/models/airtime/map/CcPlaylistTableMap.php b/airtime_mvc/application/models/airtime/map/CcPlaylistTableMap.php index e4ad1bbd5..49cd3e309 100644 --- a/airtime_mvc/application/models/airtime/map/CcPlaylistTableMap.php +++ b/airtime_mvc/application/models/airtime/map/CcPlaylistTableMap.php @@ -44,6 +44,8 @@ class CcPlaylistTableMap extends TableMap { $this->addColumn('CURRENTLYACCESSING', 'DbCurrentlyaccessing', 'INTEGER', true, null, 0); $this->addForeignKey('EDITEDBY', 'DbEditedby', 'INTEGER', 'cc_subjs', 'ID', false, null, null); $this->addColumn('MTIME', 'DbMtime', 'TIMESTAMP', false, 6, null); + $this->addColumn('UTIME', 'DbUtime', 'TIMESTAMP', false, 6, null); + $this->addColumn('LPTIME', 'DbLPtime', 'TIMESTAMP', false, 6, null); $this->addColumn('CREATOR', 'DbCreator', 'VARCHAR', false, 32, null); $this->addColumn('DESCRIPTION', 'DbDescription', 'VARCHAR', false, 512, null); // validators diff --git a/airtime_mvc/application/models/airtime/om/BaseCcFiles.php b/airtime_mvc/application/models/airtime/om/BaseCcFiles.php index cdf394d6e..e52b29851 100644 --- a/airtime_mvc/application/models/airtime/om/BaseCcFiles.php +++ b/airtime_mvc/application/models/airtime/om/BaseCcFiles.php @@ -96,6 +96,18 @@ abstract class BaseCcFiles extends BaseObject implements Persistent */ protected $mtime; + /** + * The value for the utime field. + * @var string + */ + protected $utime; + + /** + * The value for the lptime field. + * @var string + */ + protected $lptime; + /** * The value for the md5 field. * @var string @@ -590,6 +602,72 @@ abstract class BaseCcFiles extends BaseObject implements Persistent } } + /** + * Get the [optionally formatted] temporal [utime] column value. + * + * + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw DateTime object will be returned. + * @return mixed Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL + * @throws PropelException - if unable to parse/validate the date/time value. + */ + public function getDbUtime($format = 'Y-m-d H:i:s') + { + if ($this->utime === null) { + return null; + } + + + + try { + $dt = new DateTime($this->utime); + } catch (Exception $x) { + throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->utime, true), $x); + } + + if ($format === null) { + // Because propel.useDateTimeClass is TRUE, we return a DateTime object. + return $dt; + } elseif (strpos($format, '%') !== false) { + return strftime($format, $dt->format('U')); + } else { + return $dt->format($format); + } + } + + /** + * Get the [optionally formatted] temporal [lptime] column value. + * + * + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw DateTime object will be returned. + * @return mixed Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL + * @throws PropelException - if unable to parse/validate the date/time value. + */ + public function getDbLPtime($format = 'Y-m-d H:i:s') + { + if ($this->lptime === null) { + return null; + } + + + + try { + $dt = new DateTime($this->lptime); + } catch (Exception $x) { + throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->lptime, true), $x); + } + + if ($format === null) { + // Because propel.useDateTimeClass is TRUE, we return a DateTime object. + return $dt; + } elseif (strpos($format, '%') !== false) { + return strftime($format, $dt->format('U')); + } else { + return $dt->format($format); + } + } + /** * Get the [md5] column value. * @@ -1360,6 +1438,104 @@ abstract class BaseCcFiles extends BaseObject implements Persistent return $this; } // setDbMtime() + /** + * Sets the value of [utime] column to a normalized version of the date/time value specified. + * + * @param mixed $v string, integer (timestamp), or DateTime value. Empty string will + * be treated as NULL for temporal objects. + * @return CcFiles The current object (for fluent API support) + */ + public function setDbUtime($v) + { + // we treat '' as NULL for temporal objects because DateTime('') == DateTime('now') + // -- which is unexpected, to say the least. + if ($v === null || $v === '') { + $dt = null; + } elseif ($v instanceof DateTime) { + $dt = $v; + } else { + // some string/numeric value passed; we normalize that so that we can + // validate it. + try { + if (is_numeric($v)) { // if it's a unix timestamp + $dt = new DateTime('@'.$v, new DateTimeZone('UTC')); + // We have to explicitly specify and then change the time zone because of a + // DateTime bug: http://bugs.php.net/bug.php?id=43003 + $dt->setTimeZone(new DateTimeZone(date_default_timezone_get())); + } else { + $dt = new DateTime($v); + } + } catch (Exception $x) { + throw new PropelException('Error parsing date/time value: ' . var_export($v, true), $x); + } + } + + if ( $this->utime !== null || $dt !== null ) { + // (nested ifs are a little easier to read in this case) + + $currNorm = ($this->utime !== null && $tmpDt = new DateTime($this->utime)) ? $tmpDt->format('Y-m-d\\TH:i:sO') : null; + $newNorm = ($dt !== null) ? $dt->format('Y-m-d\\TH:i:sO') : null; + + if ( ($currNorm !== $newNorm) // normalized values don't match + ) + { + $this->utime = ($dt ? $dt->format('Y-m-d\\TH:i:sO') : null); + $this->modifiedColumns[] = CcFilesPeer::UTIME; + } + } // if either are not null + + return $this; + } // setDbUtime() + + /** + * Sets the value of [lptime] column to a normalized version of the date/time value specified. + * + * @param mixed $v string, integer (timestamp), or DateTime value. Empty string will + * be treated as NULL for temporal objects. + * @return CcFiles The current object (for fluent API support) + */ + public function setDbLPtime($v) + { + // we treat '' as NULL for temporal objects because DateTime('') == DateTime('now') + // -- which is unexpected, to say the least. + if ($v === null || $v === '') { + $dt = null; + } elseif ($v instanceof DateTime) { + $dt = $v; + } else { + // some string/numeric value passed; we normalize that so that we can + // validate it. + try { + if (is_numeric($v)) { // if it's a unix timestamp + $dt = new DateTime('@'.$v, new DateTimeZone('UTC')); + // We have to explicitly specify and then change the time zone because of a + // DateTime bug: http://bugs.php.net/bug.php?id=43003 + $dt->setTimeZone(new DateTimeZone(date_default_timezone_get())); + } else { + $dt = new DateTime($v); + } + } catch (Exception $x) { + throw new PropelException('Error parsing date/time value: ' . var_export($v, true), $x); + } + } + + if ( $this->lptime !== null || $dt !== null ) { + // (nested ifs are a little easier to read in this case) + + $currNorm = ($this->lptime !== null && $tmpDt = new DateTime($this->lptime)) ? $tmpDt->format('Y-m-d\\TH:i:sO') : null; + $newNorm = ($dt !== null) ? $dt->format('Y-m-d\\TH:i:sO') : null; + + if ( ($currNorm !== $newNorm) // normalized values don't match + ) + { + $this->lptime = ($dt ? $dt->format('Y-m-d\\TH:i:sO') : null); + $this->modifiedColumns[] = CcFilesPeer::LPTIME; + } + } // if either are not null + + return $this; + } // setDbLPtime() + /** * Set the value of [md5] column. * @@ -2440,55 +2616,57 @@ abstract class BaseCcFiles extends BaseObject implements Persistent $this->currentlyaccessing = ($row[$startcol + 8] !== null) ? (int) $row[$startcol + 8] : null; $this->editedby = ($row[$startcol + 9] !== null) ? (int) $row[$startcol + 9] : null; $this->mtime = ($row[$startcol + 10] !== null) ? (string) $row[$startcol + 10] : null; - $this->md5 = ($row[$startcol + 11] !== null) ? (string) $row[$startcol + 11] : null; - $this->track_title = ($row[$startcol + 12] !== null) ? (string) $row[$startcol + 12] : null; - $this->artist_name = ($row[$startcol + 13] !== null) ? (string) $row[$startcol + 13] : null; - $this->bit_rate = ($row[$startcol + 14] !== null) ? (string) $row[$startcol + 14] : null; - $this->sample_rate = ($row[$startcol + 15] !== null) ? (string) $row[$startcol + 15] : null; - $this->format = ($row[$startcol + 16] !== null) ? (string) $row[$startcol + 16] : null; - $this->length = ($row[$startcol + 17] !== null) ? (string) $row[$startcol + 17] : null; - $this->album_title = ($row[$startcol + 18] !== null) ? (string) $row[$startcol + 18] : null; - $this->genre = ($row[$startcol + 19] !== null) ? (string) $row[$startcol + 19] : null; - $this->comments = ($row[$startcol + 20] !== null) ? (string) $row[$startcol + 20] : null; - $this->year = ($row[$startcol + 21] !== null) ? (string) $row[$startcol + 21] : null; - $this->track_number = ($row[$startcol + 22] !== null) ? (int) $row[$startcol + 22] : null; - $this->channels = ($row[$startcol + 23] !== null) ? (int) $row[$startcol + 23] : null; - $this->url = ($row[$startcol + 24] !== null) ? (string) $row[$startcol + 24] : null; - $this->bpm = ($row[$startcol + 25] !== null) ? (string) $row[$startcol + 25] : null; - $this->rating = ($row[$startcol + 26] !== null) ? (string) $row[$startcol + 26] : null; - $this->encoded_by = ($row[$startcol + 27] !== null) ? (string) $row[$startcol + 27] : null; - $this->disc_number = ($row[$startcol + 28] !== null) ? (string) $row[$startcol + 28] : null; - $this->mood = ($row[$startcol + 29] !== null) ? (string) $row[$startcol + 29] : null; - $this->label = ($row[$startcol + 30] !== null) ? (string) $row[$startcol + 30] : null; - $this->composer = ($row[$startcol + 31] !== null) ? (string) $row[$startcol + 31] : null; - $this->encoder = ($row[$startcol + 32] !== null) ? (string) $row[$startcol + 32] : null; - $this->checksum = ($row[$startcol + 33] !== null) ? (string) $row[$startcol + 33] : null; - $this->lyrics = ($row[$startcol + 34] !== null) ? (string) $row[$startcol + 34] : null; - $this->orchestra = ($row[$startcol + 35] !== null) ? (string) $row[$startcol + 35] : null; - $this->conductor = ($row[$startcol + 36] !== null) ? (string) $row[$startcol + 36] : null; - $this->lyricist = ($row[$startcol + 37] !== null) ? (string) $row[$startcol + 37] : null; - $this->original_lyricist = ($row[$startcol + 38] !== null) ? (string) $row[$startcol + 38] : null; - $this->radio_station_name = ($row[$startcol + 39] !== null) ? (string) $row[$startcol + 39] : null; - $this->info_url = ($row[$startcol + 40] !== null) ? (string) $row[$startcol + 40] : null; - $this->artist_url = ($row[$startcol + 41] !== null) ? (string) $row[$startcol + 41] : null; - $this->audio_source_url = ($row[$startcol + 42] !== null) ? (string) $row[$startcol + 42] : null; - $this->radio_station_url = ($row[$startcol + 43] !== null) ? (string) $row[$startcol + 43] : null; - $this->buy_this_url = ($row[$startcol + 44] !== null) ? (string) $row[$startcol + 44] : null; - $this->isrc_number = ($row[$startcol + 45] !== null) ? (string) $row[$startcol + 45] : null; - $this->catalog_number = ($row[$startcol + 46] !== null) ? (string) $row[$startcol + 46] : null; - $this->original_artist = ($row[$startcol + 47] !== null) ? (string) $row[$startcol + 47] : null; - $this->copyright = ($row[$startcol + 48] !== null) ? (string) $row[$startcol + 48] : null; - $this->report_datetime = ($row[$startcol + 49] !== null) ? (string) $row[$startcol + 49] : null; - $this->report_location = ($row[$startcol + 50] !== null) ? (string) $row[$startcol + 50] : null; - $this->report_organization = ($row[$startcol + 51] !== null) ? (string) $row[$startcol + 51] : null; - $this->subject = ($row[$startcol + 52] !== null) ? (string) $row[$startcol + 52] : null; - $this->contributor = ($row[$startcol + 53] !== null) ? (string) $row[$startcol + 53] : null; - $this->language = ($row[$startcol + 54] !== null) ? (string) $row[$startcol + 54] : null; - $this->file_exist = ($row[$startcol + 55] !== null) ? (boolean) $row[$startcol + 55] : null; - $this->soundcloud_id = ($row[$startcol + 56] !== null) ? (int) $row[$startcol + 56] : null; - $this->soundcloud_error_code = ($row[$startcol + 57] !== null) ? (int) $row[$startcol + 57] : null; - $this->soundcloud_error_msg = ($row[$startcol + 58] !== null) ? (string) $row[$startcol + 58] : null; - $this->soundcloud_link_to_file = ($row[$startcol + 59] !== null) ? (string) $row[$startcol + 59] : null; + $this->utime = ($row[$startcol + 11] !== null) ? (string) $row[$startcol + 11] : null; + $this->lptime = ($row[$startcol + 12] !== null) ? (string) $row[$startcol + 12] : null; + $this->md5 = ($row[$startcol + 13] !== null) ? (string) $row[$startcol + 13] : null; + $this->track_title = ($row[$startcol + 14] !== null) ? (string) $row[$startcol + 14] : null; + $this->artist_name = ($row[$startcol + 15] !== null) ? (string) $row[$startcol + 15] : null; + $this->bit_rate = ($row[$startcol + 16] !== null) ? (string) $row[$startcol + 16] : null; + $this->sample_rate = ($row[$startcol + 17] !== null) ? (string) $row[$startcol + 17] : null; + $this->format = ($row[$startcol + 18] !== null) ? (string) $row[$startcol + 18] : null; + $this->length = ($row[$startcol + 19] !== null) ? (string) $row[$startcol + 19] : null; + $this->album_title = ($row[$startcol + 20] !== null) ? (string) $row[$startcol + 20] : null; + $this->genre = ($row[$startcol + 21] !== null) ? (string) $row[$startcol + 21] : null; + $this->comments = ($row[$startcol + 22] !== null) ? (string) $row[$startcol + 22] : null; + $this->year = ($row[$startcol + 23] !== null) ? (string) $row[$startcol + 23] : null; + $this->track_number = ($row[$startcol + 24] !== null) ? (int) $row[$startcol + 24] : null; + $this->channels = ($row[$startcol + 25] !== null) ? (int) $row[$startcol + 25] : null; + $this->url = ($row[$startcol + 26] !== null) ? (string) $row[$startcol + 26] : null; + $this->bpm = ($row[$startcol + 27] !== null) ? (string) $row[$startcol + 27] : null; + $this->rating = ($row[$startcol + 28] !== null) ? (string) $row[$startcol + 28] : null; + $this->encoded_by = ($row[$startcol + 29] !== null) ? (string) $row[$startcol + 29] : null; + $this->disc_number = ($row[$startcol + 30] !== null) ? (string) $row[$startcol + 30] : null; + $this->mood = ($row[$startcol + 31] !== null) ? (string) $row[$startcol + 31] : null; + $this->label = ($row[$startcol + 32] !== null) ? (string) $row[$startcol + 32] : null; + $this->composer = ($row[$startcol + 33] !== null) ? (string) $row[$startcol + 33] : null; + $this->encoder = ($row[$startcol + 34] !== null) ? (string) $row[$startcol + 34] : null; + $this->checksum = ($row[$startcol + 35] !== null) ? (string) $row[$startcol + 35] : null; + $this->lyrics = ($row[$startcol + 36] !== null) ? (string) $row[$startcol + 36] : null; + $this->orchestra = ($row[$startcol + 37] !== null) ? (string) $row[$startcol + 37] : null; + $this->conductor = ($row[$startcol + 38] !== null) ? (string) $row[$startcol + 38] : null; + $this->lyricist = ($row[$startcol + 39] !== null) ? (string) $row[$startcol + 39] : null; + $this->original_lyricist = ($row[$startcol + 40] !== null) ? (string) $row[$startcol + 40] : null; + $this->radio_station_name = ($row[$startcol + 41] !== null) ? (string) $row[$startcol + 41] : null; + $this->info_url = ($row[$startcol + 42] !== null) ? (string) $row[$startcol + 42] : null; + $this->artist_url = ($row[$startcol + 43] !== null) ? (string) $row[$startcol + 43] : null; + $this->audio_source_url = ($row[$startcol + 44] !== null) ? (string) $row[$startcol + 44] : null; + $this->radio_station_url = ($row[$startcol + 45] !== null) ? (string) $row[$startcol + 45] : null; + $this->buy_this_url = ($row[$startcol + 46] !== null) ? (string) $row[$startcol + 46] : null; + $this->isrc_number = ($row[$startcol + 47] !== null) ? (string) $row[$startcol + 47] : null; + $this->catalog_number = ($row[$startcol + 48] !== null) ? (string) $row[$startcol + 48] : null; + $this->original_artist = ($row[$startcol + 49] !== null) ? (string) $row[$startcol + 49] : null; + $this->copyright = ($row[$startcol + 50] !== null) ? (string) $row[$startcol + 50] : null; + $this->report_datetime = ($row[$startcol + 51] !== null) ? (string) $row[$startcol + 51] : null; + $this->report_location = ($row[$startcol + 52] !== null) ? (string) $row[$startcol + 52] : null; + $this->report_organization = ($row[$startcol + 53] !== null) ? (string) $row[$startcol + 53] : null; + $this->subject = ($row[$startcol + 54] !== null) ? (string) $row[$startcol + 54] : null; + $this->contributor = ($row[$startcol + 55] !== null) ? (string) $row[$startcol + 55] : null; + $this->language = ($row[$startcol + 56] !== null) ? (string) $row[$startcol + 56] : null; + $this->file_exist = ($row[$startcol + 57] !== null) ? (boolean) $row[$startcol + 57] : null; + $this->soundcloud_id = ($row[$startcol + 58] !== null) ? (int) $row[$startcol + 58] : null; + $this->soundcloud_error_code = ($row[$startcol + 59] !== null) ? (int) $row[$startcol + 59] : null; + $this->soundcloud_error_msg = ($row[$startcol + 60] !== null) ? (string) $row[$startcol + 60] : null; + $this->soundcloud_link_to_file = ($row[$startcol + 61] !== null) ? (string) $row[$startcol + 61] : null; $this->resetModified(); $this->setNew(false); @@ -2497,7 +2675,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent $this->ensureConsistency(); } - return $startcol + 60; // 60 = CcFilesPeer::NUM_COLUMNS - CcFilesPeer::NUM_LAZY_LOAD_COLUMNS). + return $startcol + 62; // 62 = CcFilesPeer::NUM_COLUMNS - CcFilesPeer::NUM_LAZY_LOAD_COLUMNS). } catch (Exception $e) { throw new PropelException("Error populating CcFiles object", $e); @@ -2929,150 +3107,156 @@ abstract class BaseCcFiles extends BaseObject implements Persistent return $this->getDbMtime(); break; case 11: - return $this->getDbMd5(); + return $this->getDbUtime(); break; case 12: - return $this->getDbTrackTitle(); + return $this->getDbLPtime(); break; case 13: - return $this->getDbArtistName(); + return $this->getDbMd5(); break; case 14: - return $this->getDbBitRate(); + return $this->getDbTrackTitle(); break; case 15: - return $this->getDbSampleRate(); + return $this->getDbArtistName(); break; case 16: - return $this->getDbFormat(); + return $this->getDbBitRate(); break; case 17: - return $this->getDbLength(); + return $this->getDbSampleRate(); break; case 18: - return $this->getDbAlbumTitle(); + return $this->getDbFormat(); break; case 19: - return $this->getDbGenre(); + return $this->getDbLength(); break; case 20: - return $this->getDbComments(); + return $this->getDbAlbumTitle(); break; case 21: - return $this->getDbYear(); + return $this->getDbGenre(); break; case 22: - return $this->getDbTrackNumber(); + return $this->getDbComments(); break; case 23: - return $this->getDbChannels(); + return $this->getDbYear(); break; case 24: - return $this->getDbUrl(); + return $this->getDbTrackNumber(); break; case 25: - return $this->getDbBpm(); + return $this->getDbChannels(); break; case 26: - return $this->getDbRating(); + return $this->getDbUrl(); break; case 27: - return $this->getDbEncodedBy(); + return $this->getDbBpm(); break; case 28: - return $this->getDbDiscNumber(); + return $this->getDbRating(); break; case 29: - return $this->getDbMood(); + return $this->getDbEncodedBy(); break; case 30: - return $this->getDbLabel(); + return $this->getDbDiscNumber(); break; case 31: - return $this->getDbComposer(); + return $this->getDbMood(); break; case 32: - return $this->getDbEncoder(); + return $this->getDbLabel(); break; case 33: - return $this->getDbChecksum(); + return $this->getDbComposer(); break; case 34: - return $this->getDbLyrics(); + return $this->getDbEncoder(); break; case 35: - return $this->getDbOrchestra(); + return $this->getDbChecksum(); break; case 36: - return $this->getDbConductor(); + return $this->getDbLyrics(); break; case 37: - return $this->getDbLyricist(); + return $this->getDbOrchestra(); break; case 38: - return $this->getDbOriginalLyricist(); + return $this->getDbConductor(); break; case 39: - return $this->getDbRadioStationName(); + return $this->getDbLyricist(); break; case 40: - return $this->getDbInfoUrl(); + return $this->getDbOriginalLyricist(); break; case 41: - return $this->getDbArtistUrl(); + return $this->getDbRadioStationName(); break; case 42: - return $this->getDbAudioSourceUrl(); + return $this->getDbInfoUrl(); break; case 43: - return $this->getDbRadioStationUrl(); + return $this->getDbArtistUrl(); break; case 44: - return $this->getDbBuyThisUrl(); + return $this->getDbAudioSourceUrl(); break; case 45: - return $this->getDbIsrcNumber(); + return $this->getDbRadioStationUrl(); break; case 46: - return $this->getDbCatalogNumber(); + return $this->getDbBuyThisUrl(); break; case 47: - return $this->getDbOriginalArtist(); + return $this->getDbIsrcNumber(); break; case 48: - return $this->getDbCopyright(); + return $this->getDbCatalogNumber(); break; case 49: - return $this->getDbReportDatetime(); + return $this->getDbOriginalArtist(); break; case 50: - return $this->getDbReportLocation(); + return $this->getDbCopyright(); break; case 51: - return $this->getDbReportOrganization(); + return $this->getDbReportDatetime(); break; case 52: - return $this->getDbSubject(); + return $this->getDbReportLocation(); break; case 53: - return $this->getDbContributor(); + return $this->getDbReportOrganization(); break; case 54: - return $this->getDbLanguage(); + return $this->getDbSubject(); break; case 55: - return $this->getDbFileExist(); + return $this->getDbContributor(); break; case 56: - return $this->getDbSoundcloudId(); + return $this->getDbLanguage(); break; case 57: - return $this->getDbSoundcloudErrorCode(); + return $this->getDbFileExist(); break; case 58: - return $this->getDbSoundcloudErrorMsg(); + return $this->getDbSoundcloudId(); break; case 59: + return $this->getDbSoundcloudErrorCode(); + break; + case 60: + return $this->getDbSoundcloudErrorMsg(); + break; + case 61: return $this->getDbSoundcloudLinkToFile(); break; default: @@ -3110,55 +3294,57 @@ abstract class BaseCcFiles extends BaseObject implements Persistent $keys[8] => $this->getDbCurrentlyaccessing(), $keys[9] => $this->getDbEditedby(), $keys[10] => $this->getDbMtime(), - $keys[11] => $this->getDbMd5(), - $keys[12] => $this->getDbTrackTitle(), - $keys[13] => $this->getDbArtistName(), - $keys[14] => $this->getDbBitRate(), - $keys[15] => $this->getDbSampleRate(), - $keys[16] => $this->getDbFormat(), - $keys[17] => $this->getDbLength(), - $keys[18] => $this->getDbAlbumTitle(), - $keys[19] => $this->getDbGenre(), - $keys[20] => $this->getDbComments(), - $keys[21] => $this->getDbYear(), - $keys[22] => $this->getDbTrackNumber(), - $keys[23] => $this->getDbChannels(), - $keys[24] => $this->getDbUrl(), - $keys[25] => $this->getDbBpm(), - $keys[26] => $this->getDbRating(), - $keys[27] => $this->getDbEncodedBy(), - $keys[28] => $this->getDbDiscNumber(), - $keys[29] => $this->getDbMood(), - $keys[30] => $this->getDbLabel(), - $keys[31] => $this->getDbComposer(), - $keys[32] => $this->getDbEncoder(), - $keys[33] => $this->getDbChecksum(), - $keys[34] => $this->getDbLyrics(), - $keys[35] => $this->getDbOrchestra(), - $keys[36] => $this->getDbConductor(), - $keys[37] => $this->getDbLyricist(), - $keys[38] => $this->getDbOriginalLyricist(), - $keys[39] => $this->getDbRadioStationName(), - $keys[40] => $this->getDbInfoUrl(), - $keys[41] => $this->getDbArtistUrl(), - $keys[42] => $this->getDbAudioSourceUrl(), - $keys[43] => $this->getDbRadioStationUrl(), - $keys[44] => $this->getDbBuyThisUrl(), - $keys[45] => $this->getDbIsrcNumber(), - $keys[46] => $this->getDbCatalogNumber(), - $keys[47] => $this->getDbOriginalArtist(), - $keys[48] => $this->getDbCopyright(), - $keys[49] => $this->getDbReportDatetime(), - $keys[50] => $this->getDbReportLocation(), - $keys[51] => $this->getDbReportOrganization(), - $keys[52] => $this->getDbSubject(), - $keys[53] => $this->getDbContributor(), - $keys[54] => $this->getDbLanguage(), - $keys[55] => $this->getDbFileExist(), - $keys[56] => $this->getDbSoundcloudId(), - $keys[57] => $this->getDbSoundcloudErrorCode(), - $keys[58] => $this->getDbSoundcloudErrorMsg(), - $keys[59] => $this->getDbSoundcloudLinkToFile(), + $keys[11] => $this->getDbUtime(), + $keys[12] => $this->getDbLPtime(), + $keys[13] => $this->getDbMd5(), + $keys[14] => $this->getDbTrackTitle(), + $keys[15] => $this->getDbArtistName(), + $keys[16] => $this->getDbBitRate(), + $keys[17] => $this->getDbSampleRate(), + $keys[18] => $this->getDbFormat(), + $keys[19] => $this->getDbLength(), + $keys[20] => $this->getDbAlbumTitle(), + $keys[21] => $this->getDbGenre(), + $keys[22] => $this->getDbComments(), + $keys[23] => $this->getDbYear(), + $keys[24] => $this->getDbTrackNumber(), + $keys[25] => $this->getDbChannels(), + $keys[26] => $this->getDbUrl(), + $keys[27] => $this->getDbBpm(), + $keys[28] => $this->getDbRating(), + $keys[29] => $this->getDbEncodedBy(), + $keys[30] => $this->getDbDiscNumber(), + $keys[31] => $this->getDbMood(), + $keys[32] => $this->getDbLabel(), + $keys[33] => $this->getDbComposer(), + $keys[34] => $this->getDbEncoder(), + $keys[35] => $this->getDbChecksum(), + $keys[36] => $this->getDbLyrics(), + $keys[37] => $this->getDbOrchestra(), + $keys[38] => $this->getDbConductor(), + $keys[39] => $this->getDbLyricist(), + $keys[40] => $this->getDbOriginalLyricist(), + $keys[41] => $this->getDbRadioStationName(), + $keys[42] => $this->getDbInfoUrl(), + $keys[43] => $this->getDbArtistUrl(), + $keys[44] => $this->getDbAudioSourceUrl(), + $keys[45] => $this->getDbRadioStationUrl(), + $keys[46] => $this->getDbBuyThisUrl(), + $keys[47] => $this->getDbIsrcNumber(), + $keys[48] => $this->getDbCatalogNumber(), + $keys[49] => $this->getDbOriginalArtist(), + $keys[50] => $this->getDbCopyright(), + $keys[51] => $this->getDbReportDatetime(), + $keys[52] => $this->getDbReportLocation(), + $keys[53] => $this->getDbReportOrganization(), + $keys[54] => $this->getDbSubject(), + $keys[55] => $this->getDbContributor(), + $keys[56] => $this->getDbLanguage(), + $keys[57] => $this->getDbFileExist(), + $keys[58] => $this->getDbSoundcloudId(), + $keys[59] => $this->getDbSoundcloudErrorCode(), + $keys[60] => $this->getDbSoundcloudErrorMsg(), + $keys[61] => $this->getDbSoundcloudLinkToFile(), ); if ($includeForeignObjects) { if (null !== $this->aCcSubjs) { @@ -3232,150 +3418,156 @@ abstract class BaseCcFiles extends BaseObject implements Persistent $this->setDbMtime($value); break; case 11: - $this->setDbMd5($value); + $this->setDbUtime($value); break; case 12: - $this->setDbTrackTitle($value); + $this->setDbLPtime($value); break; case 13: - $this->setDbArtistName($value); + $this->setDbMd5($value); break; case 14: - $this->setDbBitRate($value); + $this->setDbTrackTitle($value); break; case 15: - $this->setDbSampleRate($value); + $this->setDbArtistName($value); break; case 16: - $this->setDbFormat($value); + $this->setDbBitRate($value); break; case 17: - $this->setDbLength($value); + $this->setDbSampleRate($value); break; case 18: - $this->setDbAlbumTitle($value); + $this->setDbFormat($value); break; case 19: - $this->setDbGenre($value); + $this->setDbLength($value); break; case 20: - $this->setDbComments($value); + $this->setDbAlbumTitle($value); break; case 21: - $this->setDbYear($value); + $this->setDbGenre($value); break; case 22: - $this->setDbTrackNumber($value); + $this->setDbComments($value); break; case 23: - $this->setDbChannels($value); + $this->setDbYear($value); break; case 24: - $this->setDbUrl($value); + $this->setDbTrackNumber($value); break; case 25: - $this->setDbBpm($value); + $this->setDbChannels($value); break; case 26: - $this->setDbRating($value); + $this->setDbUrl($value); break; case 27: - $this->setDbEncodedBy($value); + $this->setDbBpm($value); break; case 28: - $this->setDbDiscNumber($value); + $this->setDbRating($value); break; case 29: - $this->setDbMood($value); + $this->setDbEncodedBy($value); break; case 30: - $this->setDbLabel($value); + $this->setDbDiscNumber($value); break; case 31: - $this->setDbComposer($value); + $this->setDbMood($value); break; case 32: - $this->setDbEncoder($value); + $this->setDbLabel($value); break; case 33: - $this->setDbChecksum($value); + $this->setDbComposer($value); break; case 34: - $this->setDbLyrics($value); + $this->setDbEncoder($value); break; case 35: - $this->setDbOrchestra($value); + $this->setDbChecksum($value); break; case 36: - $this->setDbConductor($value); + $this->setDbLyrics($value); break; case 37: - $this->setDbLyricist($value); + $this->setDbOrchestra($value); break; case 38: - $this->setDbOriginalLyricist($value); + $this->setDbConductor($value); break; case 39: - $this->setDbRadioStationName($value); + $this->setDbLyricist($value); break; case 40: - $this->setDbInfoUrl($value); + $this->setDbOriginalLyricist($value); break; case 41: - $this->setDbArtistUrl($value); + $this->setDbRadioStationName($value); break; case 42: - $this->setDbAudioSourceUrl($value); + $this->setDbInfoUrl($value); break; case 43: - $this->setDbRadioStationUrl($value); + $this->setDbArtistUrl($value); break; case 44: - $this->setDbBuyThisUrl($value); + $this->setDbAudioSourceUrl($value); break; case 45: - $this->setDbIsrcNumber($value); + $this->setDbRadioStationUrl($value); break; case 46: - $this->setDbCatalogNumber($value); + $this->setDbBuyThisUrl($value); break; case 47: - $this->setDbOriginalArtist($value); + $this->setDbIsrcNumber($value); break; case 48: - $this->setDbCopyright($value); + $this->setDbCatalogNumber($value); break; case 49: - $this->setDbReportDatetime($value); + $this->setDbOriginalArtist($value); break; case 50: - $this->setDbReportLocation($value); + $this->setDbCopyright($value); break; case 51: - $this->setDbReportOrganization($value); + $this->setDbReportDatetime($value); break; case 52: - $this->setDbSubject($value); + $this->setDbReportLocation($value); break; case 53: - $this->setDbContributor($value); + $this->setDbReportOrganization($value); break; case 54: - $this->setDbLanguage($value); + $this->setDbSubject($value); break; case 55: - $this->setDbFileExist($value); + $this->setDbContributor($value); break; case 56: - $this->setDbSoundcloudId($value); + $this->setDbLanguage($value); break; case 57: - $this->setDbSoundcloudErrorCode($value); + $this->setDbFileExist($value); break; case 58: - $this->setDbSoundcloudErrorMsg($value); + $this->setDbSoundcloudId($value); break; case 59: + $this->setDbSoundcloudErrorCode($value); + break; + case 60: + $this->setDbSoundcloudErrorMsg($value); + break; + case 61: $this->setDbSoundcloudLinkToFile($value); break; } // switch() @@ -3413,55 +3605,57 @@ abstract class BaseCcFiles extends BaseObject implements Persistent if (array_key_exists($keys[8], $arr)) $this->setDbCurrentlyaccessing($arr[$keys[8]]); if (array_key_exists($keys[9], $arr)) $this->setDbEditedby($arr[$keys[9]]); if (array_key_exists($keys[10], $arr)) $this->setDbMtime($arr[$keys[10]]); - if (array_key_exists($keys[11], $arr)) $this->setDbMd5($arr[$keys[11]]); - if (array_key_exists($keys[12], $arr)) $this->setDbTrackTitle($arr[$keys[12]]); - if (array_key_exists($keys[13], $arr)) $this->setDbArtistName($arr[$keys[13]]); - if (array_key_exists($keys[14], $arr)) $this->setDbBitRate($arr[$keys[14]]); - if (array_key_exists($keys[15], $arr)) $this->setDbSampleRate($arr[$keys[15]]); - if (array_key_exists($keys[16], $arr)) $this->setDbFormat($arr[$keys[16]]); - if (array_key_exists($keys[17], $arr)) $this->setDbLength($arr[$keys[17]]); - if (array_key_exists($keys[18], $arr)) $this->setDbAlbumTitle($arr[$keys[18]]); - if (array_key_exists($keys[19], $arr)) $this->setDbGenre($arr[$keys[19]]); - if (array_key_exists($keys[20], $arr)) $this->setDbComments($arr[$keys[20]]); - if (array_key_exists($keys[21], $arr)) $this->setDbYear($arr[$keys[21]]); - if (array_key_exists($keys[22], $arr)) $this->setDbTrackNumber($arr[$keys[22]]); - if (array_key_exists($keys[23], $arr)) $this->setDbChannels($arr[$keys[23]]); - if (array_key_exists($keys[24], $arr)) $this->setDbUrl($arr[$keys[24]]); - if (array_key_exists($keys[25], $arr)) $this->setDbBpm($arr[$keys[25]]); - if (array_key_exists($keys[26], $arr)) $this->setDbRating($arr[$keys[26]]); - if (array_key_exists($keys[27], $arr)) $this->setDbEncodedBy($arr[$keys[27]]); - if (array_key_exists($keys[28], $arr)) $this->setDbDiscNumber($arr[$keys[28]]); - if (array_key_exists($keys[29], $arr)) $this->setDbMood($arr[$keys[29]]); - if (array_key_exists($keys[30], $arr)) $this->setDbLabel($arr[$keys[30]]); - if (array_key_exists($keys[31], $arr)) $this->setDbComposer($arr[$keys[31]]); - if (array_key_exists($keys[32], $arr)) $this->setDbEncoder($arr[$keys[32]]); - if (array_key_exists($keys[33], $arr)) $this->setDbChecksum($arr[$keys[33]]); - if (array_key_exists($keys[34], $arr)) $this->setDbLyrics($arr[$keys[34]]); - if (array_key_exists($keys[35], $arr)) $this->setDbOrchestra($arr[$keys[35]]); - if (array_key_exists($keys[36], $arr)) $this->setDbConductor($arr[$keys[36]]); - if (array_key_exists($keys[37], $arr)) $this->setDbLyricist($arr[$keys[37]]); - if (array_key_exists($keys[38], $arr)) $this->setDbOriginalLyricist($arr[$keys[38]]); - if (array_key_exists($keys[39], $arr)) $this->setDbRadioStationName($arr[$keys[39]]); - if (array_key_exists($keys[40], $arr)) $this->setDbInfoUrl($arr[$keys[40]]); - if (array_key_exists($keys[41], $arr)) $this->setDbArtistUrl($arr[$keys[41]]); - if (array_key_exists($keys[42], $arr)) $this->setDbAudioSourceUrl($arr[$keys[42]]); - if (array_key_exists($keys[43], $arr)) $this->setDbRadioStationUrl($arr[$keys[43]]); - if (array_key_exists($keys[44], $arr)) $this->setDbBuyThisUrl($arr[$keys[44]]); - if (array_key_exists($keys[45], $arr)) $this->setDbIsrcNumber($arr[$keys[45]]); - if (array_key_exists($keys[46], $arr)) $this->setDbCatalogNumber($arr[$keys[46]]); - if (array_key_exists($keys[47], $arr)) $this->setDbOriginalArtist($arr[$keys[47]]); - if (array_key_exists($keys[48], $arr)) $this->setDbCopyright($arr[$keys[48]]); - if (array_key_exists($keys[49], $arr)) $this->setDbReportDatetime($arr[$keys[49]]); - if (array_key_exists($keys[50], $arr)) $this->setDbReportLocation($arr[$keys[50]]); - if (array_key_exists($keys[51], $arr)) $this->setDbReportOrganization($arr[$keys[51]]); - if (array_key_exists($keys[52], $arr)) $this->setDbSubject($arr[$keys[52]]); - if (array_key_exists($keys[53], $arr)) $this->setDbContributor($arr[$keys[53]]); - if (array_key_exists($keys[54], $arr)) $this->setDbLanguage($arr[$keys[54]]); - if (array_key_exists($keys[55], $arr)) $this->setDbFileExist($arr[$keys[55]]); - if (array_key_exists($keys[56], $arr)) $this->setDbSoundcloudId($arr[$keys[56]]); - if (array_key_exists($keys[57], $arr)) $this->setDbSoundcloudErrorCode($arr[$keys[57]]); - if (array_key_exists($keys[58], $arr)) $this->setDbSoundcloudErrorMsg($arr[$keys[58]]); - if (array_key_exists($keys[59], $arr)) $this->setDbSoundcloudLinkToFile($arr[$keys[59]]); + if (array_key_exists($keys[11], $arr)) $this->setDbUtime($arr[$keys[11]]); + if (array_key_exists($keys[12], $arr)) $this->setDbLPtime($arr[$keys[12]]); + if (array_key_exists($keys[13], $arr)) $this->setDbMd5($arr[$keys[13]]); + if (array_key_exists($keys[14], $arr)) $this->setDbTrackTitle($arr[$keys[14]]); + if (array_key_exists($keys[15], $arr)) $this->setDbArtistName($arr[$keys[15]]); + if (array_key_exists($keys[16], $arr)) $this->setDbBitRate($arr[$keys[16]]); + if (array_key_exists($keys[17], $arr)) $this->setDbSampleRate($arr[$keys[17]]); + if (array_key_exists($keys[18], $arr)) $this->setDbFormat($arr[$keys[18]]); + if (array_key_exists($keys[19], $arr)) $this->setDbLength($arr[$keys[19]]); + if (array_key_exists($keys[20], $arr)) $this->setDbAlbumTitle($arr[$keys[20]]); + if (array_key_exists($keys[21], $arr)) $this->setDbGenre($arr[$keys[21]]); + if (array_key_exists($keys[22], $arr)) $this->setDbComments($arr[$keys[22]]); + if (array_key_exists($keys[23], $arr)) $this->setDbYear($arr[$keys[23]]); + if (array_key_exists($keys[24], $arr)) $this->setDbTrackNumber($arr[$keys[24]]); + if (array_key_exists($keys[25], $arr)) $this->setDbChannels($arr[$keys[25]]); + if (array_key_exists($keys[26], $arr)) $this->setDbUrl($arr[$keys[26]]); + if (array_key_exists($keys[27], $arr)) $this->setDbBpm($arr[$keys[27]]); + if (array_key_exists($keys[28], $arr)) $this->setDbRating($arr[$keys[28]]); + if (array_key_exists($keys[29], $arr)) $this->setDbEncodedBy($arr[$keys[29]]); + if (array_key_exists($keys[30], $arr)) $this->setDbDiscNumber($arr[$keys[30]]); + if (array_key_exists($keys[31], $arr)) $this->setDbMood($arr[$keys[31]]); + if (array_key_exists($keys[32], $arr)) $this->setDbLabel($arr[$keys[32]]); + if (array_key_exists($keys[33], $arr)) $this->setDbComposer($arr[$keys[33]]); + if (array_key_exists($keys[34], $arr)) $this->setDbEncoder($arr[$keys[34]]); + if (array_key_exists($keys[35], $arr)) $this->setDbChecksum($arr[$keys[35]]); + if (array_key_exists($keys[36], $arr)) $this->setDbLyrics($arr[$keys[36]]); + if (array_key_exists($keys[37], $arr)) $this->setDbOrchestra($arr[$keys[37]]); + if (array_key_exists($keys[38], $arr)) $this->setDbConductor($arr[$keys[38]]); + if (array_key_exists($keys[39], $arr)) $this->setDbLyricist($arr[$keys[39]]); + if (array_key_exists($keys[40], $arr)) $this->setDbOriginalLyricist($arr[$keys[40]]); + if (array_key_exists($keys[41], $arr)) $this->setDbRadioStationName($arr[$keys[41]]); + if (array_key_exists($keys[42], $arr)) $this->setDbInfoUrl($arr[$keys[42]]); + if (array_key_exists($keys[43], $arr)) $this->setDbArtistUrl($arr[$keys[43]]); + if (array_key_exists($keys[44], $arr)) $this->setDbAudioSourceUrl($arr[$keys[44]]); + if (array_key_exists($keys[45], $arr)) $this->setDbRadioStationUrl($arr[$keys[45]]); + if (array_key_exists($keys[46], $arr)) $this->setDbBuyThisUrl($arr[$keys[46]]); + if (array_key_exists($keys[47], $arr)) $this->setDbIsrcNumber($arr[$keys[47]]); + if (array_key_exists($keys[48], $arr)) $this->setDbCatalogNumber($arr[$keys[48]]); + if (array_key_exists($keys[49], $arr)) $this->setDbOriginalArtist($arr[$keys[49]]); + if (array_key_exists($keys[50], $arr)) $this->setDbCopyright($arr[$keys[50]]); + if (array_key_exists($keys[51], $arr)) $this->setDbReportDatetime($arr[$keys[51]]); + if (array_key_exists($keys[52], $arr)) $this->setDbReportLocation($arr[$keys[52]]); + if (array_key_exists($keys[53], $arr)) $this->setDbReportOrganization($arr[$keys[53]]); + if (array_key_exists($keys[54], $arr)) $this->setDbSubject($arr[$keys[54]]); + if (array_key_exists($keys[55], $arr)) $this->setDbContributor($arr[$keys[55]]); + if (array_key_exists($keys[56], $arr)) $this->setDbLanguage($arr[$keys[56]]); + if (array_key_exists($keys[57], $arr)) $this->setDbFileExist($arr[$keys[57]]); + if (array_key_exists($keys[58], $arr)) $this->setDbSoundcloudId($arr[$keys[58]]); + if (array_key_exists($keys[59], $arr)) $this->setDbSoundcloudErrorCode($arr[$keys[59]]); + if (array_key_exists($keys[60], $arr)) $this->setDbSoundcloudErrorMsg($arr[$keys[60]]); + if (array_key_exists($keys[61], $arr)) $this->setDbSoundcloudLinkToFile($arr[$keys[61]]); } /** @@ -3484,6 +3678,8 @@ abstract class BaseCcFiles extends BaseObject implements Persistent if ($this->isColumnModified(CcFilesPeer::CURRENTLYACCESSING)) $criteria->add(CcFilesPeer::CURRENTLYACCESSING, $this->currentlyaccessing); if ($this->isColumnModified(CcFilesPeer::EDITEDBY)) $criteria->add(CcFilesPeer::EDITEDBY, $this->editedby); if ($this->isColumnModified(CcFilesPeer::MTIME)) $criteria->add(CcFilesPeer::MTIME, $this->mtime); + if ($this->isColumnModified(CcFilesPeer::UTIME)) $criteria->add(CcFilesPeer::UTIME, $this->utime); + if ($this->isColumnModified(CcFilesPeer::LPTIME)) $criteria->add(CcFilesPeer::LPTIME, $this->lptime); if ($this->isColumnModified(CcFilesPeer::MD5)) $criteria->add(CcFilesPeer::MD5, $this->md5); if ($this->isColumnModified(CcFilesPeer::TRACK_TITLE)) $criteria->add(CcFilesPeer::TRACK_TITLE, $this->track_title); if ($this->isColumnModified(CcFilesPeer::ARTIST_NAME)) $criteria->add(CcFilesPeer::ARTIST_NAME, $this->artist_name); @@ -3604,6 +3800,8 @@ abstract class BaseCcFiles extends BaseObject implements Persistent $copyObj->setDbCurrentlyaccessing($this->currentlyaccessing); $copyObj->setDbEditedby($this->editedby); $copyObj->setDbMtime($this->mtime); + $copyObj->setDbUtime($this->utime); + $copyObj->setDbLPtime($this->lptime); $copyObj->setDbMd5($this->md5); $copyObj->setDbTrackTitle($this->track_title); $copyObj->setDbArtistName($this->artist_name); @@ -4263,6 +4461,8 @@ abstract class BaseCcFiles extends BaseObject implements Persistent $this->currentlyaccessing = null; $this->editedby = null; $this->mtime = null; + $this->utime = null; + $this->lptime = null; $this->md5 = null; $this->track_title = null; $this->artist_name = null; diff --git a/airtime_mvc/application/models/airtime/om/BaseCcFilesPeer.php b/airtime_mvc/application/models/airtime/om/BaseCcFilesPeer.php index 1eb509522..4e6291bb0 100644 --- a/airtime_mvc/application/models/airtime/om/BaseCcFilesPeer.php +++ b/airtime_mvc/application/models/airtime/om/BaseCcFilesPeer.php @@ -26,7 +26,7 @@ abstract class BaseCcFilesPeer { const TM_CLASS = 'CcFilesTableMap'; /** The total number of columns. */ - const NUM_COLUMNS = 60; + const NUM_COLUMNS = 62; /** The number of lazy-loaded columns. */ const NUM_LAZY_LOAD_COLUMNS = 0; @@ -64,6 +64,12 @@ abstract class BaseCcFilesPeer { /** the column name for the MTIME field */ const MTIME = 'cc_files.MTIME'; + /** the column name for the UTIME field */ + const UTIME = 'cc_files.UTIME'; + + /** the column name for the LPTIME field */ + const LPTIME = 'cc_files.LPTIME'; + /** the column name for the MD5 field */ const MD5 = 'cc_files.MD5'; @@ -227,12 +233,12 @@ abstract class BaseCcFilesPeer { * e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id' */ private static $fieldNames = array ( - BasePeer::TYPE_PHPNAME => array ('DbId', 'DbGunid', 'DbName', 'DbMime', 'DbFtype', 'DbDirectory', 'DbFilepath', 'DbState', 'DbCurrentlyaccessing', 'DbEditedby', 'DbMtime', 'DbMd5', 'DbTrackTitle', 'DbArtistName', 'DbBitRate', 'DbSampleRate', 'DbFormat', 'DbLength', 'DbAlbumTitle', 'DbGenre', 'DbComments', 'DbYear', 'DbTrackNumber', 'DbChannels', 'DbUrl', 'DbBpm', 'DbRating', 'DbEncodedBy', 'DbDiscNumber', 'DbMood', 'DbLabel', 'DbComposer', 'DbEncoder', 'DbChecksum', 'DbLyrics', 'DbOrchestra', 'DbConductor', 'DbLyricist', 'DbOriginalLyricist', 'DbRadioStationName', 'DbInfoUrl', 'DbArtistUrl', 'DbAudioSourceUrl', 'DbRadioStationUrl', 'DbBuyThisUrl', 'DbIsrcNumber', 'DbCatalogNumber', 'DbOriginalArtist', 'DbCopyright', 'DbReportDatetime', 'DbReportLocation', 'DbReportOrganization', 'DbSubject', 'DbContributor', 'DbLanguage', 'DbFileExist', 'DbSoundcloudId', 'DbSoundcloudErrorCode', 'DbSoundcloudErrorMsg', 'DbSoundcloudLinkToFile', ), - BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbGunid', 'dbName', 'dbMime', 'dbFtype', 'dbDirectory', 'dbFilepath', 'dbState', 'dbCurrentlyaccessing', 'dbEditedby', 'dbMtime', 'dbMd5', 'dbTrackTitle', 'dbArtistName', 'dbBitRate', 'dbSampleRate', 'dbFormat', 'dbLength', 'dbAlbumTitle', 'dbGenre', 'dbComments', 'dbYear', 'dbTrackNumber', 'dbChannels', 'dbUrl', 'dbBpm', 'dbRating', 'dbEncodedBy', 'dbDiscNumber', 'dbMood', 'dbLabel', 'dbComposer', 'dbEncoder', 'dbChecksum', 'dbLyrics', 'dbOrchestra', 'dbConductor', 'dbLyricist', 'dbOriginalLyricist', 'dbRadioStationName', 'dbInfoUrl', 'dbArtistUrl', 'dbAudioSourceUrl', 'dbRadioStationUrl', 'dbBuyThisUrl', 'dbIsrcNumber', 'dbCatalogNumber', 'dbOriginalArtist', 'dbCopyright', 'dbReportDatetime', 'dbReportLocation', 'dbReportOrganization', 'dbSubject', 'dbContributor', 'dbLanguage', 'dbFileExist', 'dbSoundcloudId', 'dbSoundcloudErrorCode', 'dbSoundcloudErrorMsg', 'dbSoundcloudLinkToFile', ), - BasePeer::TYPE_COLNAME => array (self::ID, self::GUNID, self::NAME, self::MIME, self::FTYPE, self::DIRECTORY, self::FILEPATH, self::STATE, self::CURRENTLYACCESSING, self::EDITEDBY, self::MTIME, self::MD5, self::TRACK_TITLE, self::ARTIST_NAME, self::BIT_RATE, self::SAMPLE_RATE, self::FORMAT, self::LENGTH, self::ALBUM_TITLE, self::GENRE, self::COMMENTS, self::YEAR, self::TRACK_NUMBER, self::CHANNELS, self::URL, self::BPM, self::RATING, self::ENCODED_BY, self::DISC_NUMBER, self::MOOD, self::LABEL, self::COMPOSER, self::ENCODER, self::CHECKSUM, self::LYRICS, self::ORCHESTRA, self::CONDUCTOR, self::LYRICIST, self::ORIGINAL_LYRICIST, self::RADIO_STATION_NAME, self::INFO_URL, self::ARTIST_URL, self::AUDIO_SOURCE_URL, self::RADIO_STATION_URL, self::BUY_THIS_URL, self::ISRC_NUMBER, self::CATALOG_NUMBER, self::ORIGINAL_ARTIST, self::COPYRIGHT, self::REPORT_DATETIME, self::REPORT_LOCATION, self::REPORT_ORGANIZATION, self::SUBJECT, self::CONTRIBUTOR, self::LANGUAGE, self::FILE_EXIST, self::SOUNDCLOUD_ID, self::SOUNDCLOUD_ERROR_CODE, self::SOUNDCLOUD_ERROR_MSG, self::SOUNDCLOUD_LINK_TO_FILE, ), - BasePeer::TYPE_RAW_COLNAME => array ('ID', 'GUNID', 'NAME', 'MIME', 'FTYPE', 'DIRECTORY', 'FILEPATH', 'STATE', 'CURRENTLYACCESSING', 'EDITEDBY', 'MTIME', 'MD5', 'TRACK_TITLE', 'ARTIST_NAME', 'BIT_RATE', 'SAMPLE_RATE', 'FORMAT', 'LENGTH', 'ALBUM_TITLE', 'GENRE', 'COMMENTS', 'YEAR', 'TRACK_NUMBER', 'CHANNELS', 'URL', 'BPM', 'RATING', 'ENCODED_BY', 'DISC_NUMBER', 'MOOD', 'LABEL', 'COMPOSER', 'ENCODER', 'CHECKSUM', 'LYRICS', 'ORCHESTRA', 'CONDUCTOR', 'LYRICIST', 'ORIGINAL_LYRICIST', 'RADIO_STATION_NAME', 'INFO_URL', 'ARTIST_URL', 'AUDIO_SOURCE_URL', 'RADIO_STATION_URL', 'BUY_THIS_URL', 'ISRC_NUMBER', 'CATALOG_NUMBER', 'ORIGINAL_ARTIST', 'COPYRIGHT', 'REPORT_DATETIME', 'REPORT_LOCATION', 'REPORT_ORGANIZATION', 'SUBJECT', 'CONTRIBUTOR', 'LANGUAGE', 'FILE_EXIST', 'SOUNDCLOUD_ID', 'SOUNDCLOUD_ERROR_CODE', 'SOUNDCLOUD_ERROR_MSG', 'SOUNDCLOUD_LINK_TO_FILE', ), - BasePeer::TYPE_FIELDNAME => array ('id', 'gunid', 'name', 'mime', 'ftype', 'directory', 'filepath', 'state', 'currentlyaccessing', 'editedby', 'mtime', 'md5', 'track_title', 'artist_name', 'bit_rate', 'sample_rate', 'format', 'length', 'album_title', 'genre', 'comments', 'year', 'track_number', 'channels', 'url', 'bpm', 'rating', 'encoded_by', 'disc_number', 'mood', 'label', 'composer', 'encoder', 'checksum', 'lyrics', 'orchestra', 'conductor', 'lyricist', 'original_lyricist', 'radio_station_name', 'info_url', 'artist_url', 'audio_source_url', 'radio_station_url', 'buy_this_url', 'isrc_number', 'catalog_number', 'original_artist', 'copyright', 'report_datetime', 'report_location', 'report_organization', 'subject', 'contributor', 'language', 'file_exist', 'soundcloud_id', 'soundcloud_error_code', 'soundcloud_error_msg', 'soundcloud_link_to_file', ), - 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, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, ) + BasePeer::TYPE_PHPNAME => array ('DbId', 'DbGunid', 'DbName', 'DbMime', 'DbFtype', 'DbDirectory', 'DbFilepath', 'DbState', 'DbCurrentlyaccessing', 'DbEditedby', 'DbMtime', 'DbUtime', 'DbLPtime', 'DbMd5', 'DbTrackTitle', 'DbArtistName', 'DbBitRate', 'DbSampleRate', 'DbFormat', 'DbLength', 'DbAlbumTitle', 'DbGenre', 'DbComments', 'DbYear', 'DbTrackNumber', 'DbChannels', 'DbUrl', 'DbBpm', 'DbRating', 'DbEncodedBy', 'DbDiscNumber', 'DbMood', 'DbLabel', 'DbComposer', 'DbEncoder', 'DbChecksum', 'DbLyrics', 'DbOrchestra', 'DbConductor', 'DbLyricist', 'DbOriginalLyricist', 'DbRadioStationName', 'DbInfoUrl', 'DbArtistUrl', 'DbAudioSourceUrl', 'DbRadioStationUrl', 'DbBuyThisUrl', 'DbIsrcNumber', 'DbCatalogNumber', 'DbOriginalArtist', 'DbCopyright', 'DbReportDatetime', 'DbReportLocation', 'DbReportOrganization', 'DbSubject', 'DbContributor', 'DbLanguage', 'DbFileExist', 'DbSoundcloudId', 'DbSoundcloudErrorCode', 'DbSoundcloudErrorMsg', 'DbSoundcloudLinkToFile', ), + BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbGunid', 'dbName', 'dbMime', 'dbFtype', 'dbDirectory', 'dbFilepath', 'dbState', 'dbCurrentlyaccessing', 'dbEditedby', 'dbMtime', 'dbUtime', 'dbLPtime', 'dbMd5', 'dbTrackTitle', 'dbArtistName', 'dbBitRate', 'dbSampleRate', 'dbFormat', 'dbLength', 'dbAlbumTitle', 'dbGenre', 'dbComments', 'dbYear', 'dbTrackNumber', 'dbChannels', 'dbUrl', 'dbBpm', 'dbRating', 'dbEncodedBy', 'dbDiscNumber', 'dbMood', 'dbLabel', 'dbComposer', 'dbEncoder', 'dbChecksum', 'dbLyrics', 'dbOrchestra', 'dbConductor', 'dbLyricist', 'dbOriginalLyricist', 'dbRadioStationName', 'dbInfoUrl', 'dbArtistUrl', 'dbAudioSourceUrl', 'dbRadioStationUrl', 'dbBuyThisUrl', 'dbIsrcNumber', 'dbCatalogNumber', 'dbOriginalArtist', 'dbCopyright', 'dbReportDatetime', 'dbReportLocation', 'dbReportOrganization', 'dbSubject', 'dbContributor', 'dbLanguage', 'dbFileExist', 'dbSoundcloudId', 'dbSoundcloudErrorCode', 'dbSoundcloudErrorMsg', 'dbSoundcloudLinkToFile', ), + BasePeer::TYPE_COLNAME => array (self::ID, self::GUNID, self::NAME, self::MIME, self::FTYPE, self::DIRECTORY, self::FILEPATH, self::STATE, self::CURRENTLYACCESSING, self::EDITEDBY, self::MTIME, self::UTIME, self::LPTIME, self::MD5, self::TRACK_TITLE, self::ARTIST_NAME, self::BIT_RATE, self::SAMPLE_RATE, self::FORMAT, self::LENGTH, self::ALBUM_TITLE, self::GENRE, self::COMMENTS, self::YEAR, self::TRACK_NUMBER, self::CHANNELS, self::URL, self::BPM, self::RATING, self::ENCODED_BY, self::DISC_NUMBER, self::MOOD, self::LABEL, self::COMPOSER, self::ENCODER, self::CHECKSUM, self::LYRICS, self::ORCHESTRA, self::CONDUCTOR, self::LYRICIST, self::ORIGINAL_LYRICIST, self::RADIO_STATION_NAME, self::INFO_URL, self::ARTIST_URL, self::AUDIO_SOURCE_URL, self::RADIO_STATION_URL, self::BUY_THIS_URL, self::ISRC_NUMBER, self::CATALOG_NUMBER, self::ORIGINAL_ARTIST, self::COPYRIGHT, self::REPORT_DATETIME, self::REPORT_LOCATION, self::REPORT_ORGANIZATION, self::SUBJECT, self::CONTRIBUTOR, self::LANGUAGE, self::FILE_EXIST, self::SOUNDCLOUD_ID, self::SOUNDCLOUD_ERROR_CODE, self::SOUNDCLOUD_ERROR_MSG, self::SOUNDCLOUD_LINK_TO_FILE, ), + BasePeer::TYPE_RAW_COLNAME => array ('ID', 'GUNID', 'NAME', 'MIME', 'FTYPE', 'DIRECTORY', 'FILEPATH', 'STATE', 'CURRENTLYACCESSING', 'EDITEDBY', 'MTIME', 'UTIME', 'LPTIME', 'MD5', 'TRACK_TITLE', 'ARTIST_NAME', 'BIT_RATE', 'SAMPLE_RATE', 'FORMAT', 'LENGTH', 'ALBUM_TITLE', 'GENRE', 'COMMENTS', 'YEAR', 'TRACK_NUMBER', 'CHANNELS', 'URL', 'BPM', 'RATING', 'ENCODED_BY', 'DISC_NUMBER', 'MOOD', 'LABEL', 'COMPOSER', 'ENCODER', 'CHECKSUM', 'LYRICS', 'ORCHESTRA', 'CONDUCTOR', 'LYRICIST', 'ORIGINAL_LYRICIST', 'RADIO_STATION_NAME', 'INFO_URL', 'ARTIST_URL', 'AUDIO_SOURCE_URL', 'RADIO_STATION_URL', 'BUY_THIS_URL', 'ISRC_NUMBER', 'CATALOG_NUMBER', 'ORIGINAL_ARTIST', 'COPYRIGHT', 'REPORT_DATETIME', 'REPORT_LOCATION', 'REPORT_ORGANIZATION', 'SUBJECT', 'CONTRIBUTOR', 'LANGUAGE', 'FILE_EXIST', 'SOUNDCLOUD_ID', 'SOUNDCLOUD_ERROR_CODE', 'SOUNDCLOUD_ERROR_MSG', 'SOUNDCLOUD_LINK_TO_FILE', ), + BasePeer::TYPE_FIELDNAME => array ('id', 'gunid', 'name', 'mime', 'ftype', 'directory', 'filepath', 'state', 'currentlyaccessing', 'editedby', 'mtime', 'utime', 'lptime', 'md5', 'track_title', 'artist_name', 'bit_rate', 'sample_rate', 'format', 'length', 'album_title', 'genre', 'comments', 'year', 'track_number', 'channels', 'url', 'bpm', 'rating', 'encoded_by', 'disc_number', 'mood', 'label', 'composer', 'encoder', 'checksum', 'lyrics', 'orchestra', 'conductor', 'lyricist', 'original_lyricist', 'radio_station_name', 'info_url', 'artist_url', 'audio_source_url', 'radio_station_url', 'buy_this_url', 'isrc_number', 'catalog_number', 'original_artist', 'copyright', 'report_datetime', 'report_location', 'report_organization', 'subject', 'contributor', 'language', 'file_exist', 'soundcloud_id', 'soundcloud_error_code', 'soundcloud_error_msg', 'soundcloud_link_to_file', ), + 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, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, ) ); /** @@ -242,12 +248,12 @@ abstract class BaseCcFilesPeer { * e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0 */ private static $fieldKeys = array ( - BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbGunid' => 1, 'DbName' => 2, 'DbMime' => 3, 'DbFtype' => 4, 'DbDirectory' => 5, 'DbFilepath' => 6, 'DbState' => 7, 'DbCurrentlyaccessing' => 8, 'DbEditedby' => 9, 'DbMtime' => 10, 'DbMd5' => 11, 'DbTrackTitle' => 12, 'DbArtistName' => 13, 'DbBitRate' => 14, 'DbSampleRate' => 15, 'DbFormat' => 16, 'DbLength' => 17, 'DbAlbumTitle' => 18, 'DbGenre' => 19, 'DbComments' => 20, 'DbYear' => 21, 'DbTrackNumber' => 22, 'DbChannels' => 23, 'DbUrl' => 24, 'DbBpm' => 25, 'DbRating' => 26, 'DbEncodedBy' => 27, 'DbDiscNumber' => 28, 'DbMood' => 29, 'DbLabel' => 30, 'DbComposer' => 31, 'DbEncoder' => 32, 'DbChecksum' => 33, 'DbLyrics' => 34, 'DbOrchestra' => 35, 'DbConductor' => 36, 'DbLyricist' => 37, 'DbOriginalLyricist' => 38, 'DbRadioStationName' => 39, 'DbInfoUrl' => 40, 'DbArtistUrl' => 41, 'DbAudioSourceUrl' => 42, 'DbRadioStationUrl' => 43, 'DbBuyThisUrl' => 44, 'DbIsrcNumber' => 45, 'DbCatalogNumber' => 46, 'DbOriginalArtist' => 47, 'DbCopyright' => 48, 'DbReportDatetime' => 49, 'DbReportLocation' => 50, 'DbReportOrganization' => 51, 'DbSubject' => 52, 'DbContributor' => 53, 'DbLanguage' => 54, 'DbFileExist' => 55, 'DbSoundcloudId' => 56, 'DbSoundcloudErrorCode' => 57, 'DbSoundcloudErrorMsg' => 58, 'DbSoundcloudLinkToFile' => 59, ), - BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbGunid' => 1, 'dbName' => 2, 'dbMime' => 3, 'dbFtype' => 4, 'dbDirectory' => 5, 'dbFilepath' => 6, 'dbState' => 7, 'dbCurrentlyaccessing' => 8, 'dbEditedby' => 9, 'dbMtime' => 10, 'dbMd5' => 11, 'dbTrackTitle' => 12, 'dbArtistName' => 13, 'dbBitRate' => 14, 'dbSampleRate' => 15, 'dbFormat' => 16, 'dbLength' => 17, 'dbAlbumTitle' => 18, 'dbGenre' => 19, 'dbComments' => 20, 'dbYear' => 21, 'dbTrackNumber' => 22, 'dbChannels' => 23, 'dbUrl' => 24, 'dbBpm' => 25, 'dbRating' => 26, 'dbEncodedBy' => 27, 'dbDiscNumber' => 28, 'dbMood' => 29, 'dbLabel' => 30, 'dbComposer' => 31, 'dbEncoder' => 32, 'dbChecksum' => 33, 'dbLyrics' => 34, 'dbOrchestra' => 35, 'dbConductor' => 36, 'dbLyricist' => 37, 'dbOriginalLyricist' => 38, 'dbRadioStationName' => 39, 'dbInfoUrl' => 40, 'dbArtistUrl' => 41, 'dbAudioSourceUrl' => 42, 'dbRadioStationUrl' => 43, 'dbBuyThisUrl' => 44, 'dbIsrcNumber' => 45, 'dbCatalogNumber' => 46, 'dbOriginalArtist' => 47, 'dbCopyright' => 48, 'dbReportDatetime' => 49, 'dbReportLocation' => 50, 'dbReportOrganization' => 51, 'dbSubject' => 52, 'dbContributor' => 53, 'dbLanguage' => 54, 'dbFileExist' => 55, 'dbSoundcloudId' => 56, 'dbSoundcloudErrorCode' => 57, 'dbSoundcloudErrorMsg' => 58, 'dbSoundcloudLinkToFile' => 59, ), - BasePeer::TYPE_COLNAME => array (self::ID => 0, self::GUNID => 1, self::NAME => 2, self::MIME => 3, self::FTYPE => 4, self::DIRECTORY => 5, self::FILEPATH => 6, self::STATE => 7, self::CURRENTLYACCESSING => 8, self::EDITEDBY => 9, self::MTIME => 10, self::MD5 => 11, self::TRACK_TITLE => 12, self::ARTIST_NAME => 13, self::BIT_RATE => 14, self::SAMPLE_RATE => 15, self::FORMAT => 16, self::LENGTH => 17, self::ALBUM_TITLE => 18, self::GENRE => 19, self::COMMENTS => 20, self::YEAR => 21, self::TRACK_NUMBER => 22, self::CHANNELS => 23, self::URL => 24, self::BPM => 25, self::RATING => 26, self::ENCODED_BY => 27, self::DISC_NUMBER => 28, self::MOOD => 29, self::LABEL => 30, self::COMPOSER => 31, self::ENCODER => 32, self::CHECKSUM => 33, self::LYRICS => 34, self::ORCHESTRA => 35, self::CONDUCTOR => 36, self::LYRICIST => 37, self::ORIGINAL_LYRICIST => 38, self::RADIO_STATION_NAME => 39, self::INFO_URL => 40, self::ARTIST_URL => 41, self::AUDIO_SOURCE_URL => 42, self::RADIO_STATION_URL => 43, self::BUY_THIS_URL => 44, self::ISRC_NUMBER => 45, self::CATALOG_NUMBER => 46, self::ORIGINAL_ARTIST => 47, self::COPYRIGHT => 48, self::REPORT_DATETIME => 49, self::REPORT_LOCATION => 50, self::REPORT_ORGANIZATION => 51, self::SUBJECT => 52, self::CONTRIBUTOR => 53, self::LANGUAGE => 54, self::FILE_EXIST => 55, self::SOUNDCLOUD_ID => 56, self::SOUNDCLOUD_ERROR_CODE => 57, self::SOUNDCLOUD_ERROR_MSG => 58, self::SOUNDCLOUD_LINK_TO_FILE => 59, ), - BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'GUNID' => 1, 'NAME' => 2, 'MIME' => 3, 'FTYPE' => 4, 'DIRECTORY' => 5, 'FILEPATH' => 6, 'STATE' => 7, 'CURRENTLYACCESSING' => 8, 'EDITEDBY' => 9, 'MTIME' => 10, 'MD5' => 11, 'TRACK_TITLE' => 12, 'ARTIST_NAME' => 13, 'BIT_RATE' => 14, 'SAMPLE_RATE' => 15, 'FORMAT' => 16, 'LENGTH' => 17, 'ALBUM_TITLE' => 18, 'GENRE' => 19, 'COMMENTS' => 20, 'YEAR' => 21, 'TRACK_NUMBER' => 22, 'CHANNELS' => 23, 'URL' => 24, 'BPM' => 25, 'RATING' => 26, 'ENCODED_BY' => 27, 'DISC_NUMBER' => 28, 'MOOD' => 29, 'LABEL' => 30, 'COMPOSER' => 31, 'ENCODER' => 32, 'CHECKSUM' => 33, 'LYRICS' => 34, 'ORCHESTRA' => 35, 'CONDUCTOR' => 36, 'LYRICIST' => 37, 'ORIGINAL_LYRICIST' => 38, 'RADIO_STATION_NAME' => 39, 'INFO_URL' => 40, 'ARTIST_URL' => 41, 'AUDIO_SOURCE_URL' => 42, 'RADIO_STATION_URL' => 43, 'BUY_THIS_URL' => 44, 'ISRC_NUMBER' => 45, 'CATALOG_NUMBER' => 46, 'ORIGINAL_ARTIST' => 47, 'COPYRIGHT' => 48, 'REPORT_DATETIME' => 49, 'REPORT_LOCATION' => 50, 'REPORT_ORGANIZATION' => 51, 'SUBJECT' => 52, 'CONTRIBUTOR' => 53, 'LANGUAGE' => 54, 'FILE_EXIST' => 55, 'SOUNDCLOUD_ID' => 56, 'SOUNDCLOUD_ERROR_CODE' => 57, 'SOUNDCLOUD_ERROR_MSG' => 58, 'SOUNDCLOUD_LINK_TO_FILE' => 59, ), - BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'gunid' => 1, 'name' => 2, 'mime' => 3, 'ftype' => 4, 'directory' => 5, 'filepath' => 6, 'state' => 7, 'currentlyaccessing' => 8, 'editedby' => 9, 'mtime' => 10, 'md5' => 11, 'track_title' => 12, 'artist_name' => 13, 'bit_rate' => 14, 'sample_rate' => 15, 'format' => 16, 'length' => 17, 'album_title' => 18, 'genre' => 19, 'comments' => 20, 'year' => 21, 'track_number' => 22, 'channels' => 23, 'url' => 24, 'bpm' => 25, 'rating' => 26, 'encoded_by' => 27, 'disc_number' => 28, 'mood' => 29, 'label' => 30, 'composer' => 31, 'encoder' => 32, 'checksum' => 33, 'lyrics' => 34, 'orchestra' => 35, 'conductor' => 36, 'lyricist' => 37, 'original_lyricist' => 38, 'radio_station_name' => 39, 'info_url' => 40, 'artist_url' => 41, 'audio_source_url' => 42, 'radio_station_url' => 43, 'buy_this_url' => 44, 'isrc_number' => 45, 'catalog_number' => 46, 'original_artist' => 47, 'copyright' => 48, 'report_datetime' => 49, 'report_location' => 50, 'report_organization' => 51, 'subject' => 52, 'contributor' => 53, 'language' => 54, 'file_exist' => 55, 'soundcloud_id' => 56, 'soundcloud_error_code' => 57, 'soundcloud_error_msg' => 58, 'soundcloud_link_to_file' => 59, ), - 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, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, ) + BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbGunid' => 1, 'DbName' => 2, 'DbMime' => 3, 'DbFtype' => 4, 'DbDirectory' => 5, 'DbFilepath' => 6, 'DbState' => 7, 'DbCurrentlyaccessing' => 8, 'DbEditedby' => 9, 'DbMtime' => 10, 'DbUtime' => 11, 'DbLPtime' => 12, 'DbMd5' => 13, 'DbTrackTitle' => 14, 'DbArtistName' => 15, 'DbBitRate' => 16, 'DbSampleRate' => 17, 'DbFormat' => 18, 'DbLength' => 19, 'DbAlbumTitle' => 20, 'DbGenre' => 21, 'DbComments' => 22, 'DbYear' => 23, 'DbTrackNumber' => 24, 'DbChannels' => 25, 'DbUrl' => 26, 'DbBpm' => 27, 'DbRating' => 28, 'DbEncodedBy' => 29, 'DbDiscNumber' => 30, 'DbMood' => 31, 'DbLabel' => 32, 'DbComposer' => 33, 'DbEncoder' => 34, 'DbChecksum' => 35, 'DbLyrics' => 36, 'DbOrchestra' => 37, 'DbConductor' => 38, 'DbLyricist' => 39, 'DbOriginalLyricist' => 40, 'DbRadioStationName' => 41, 'DbInfoUrl' => 42, 'DbArtistUrl' => 43, 'DbAudioSourceUrl' => 44, 'DbRadioStationUrl' => 45, 'DbBuyThisUrl' => 46, 'DbIsrcNumber' => 47, 'DbCatalogNumber' => 48, 'DbOriginalArtist' => 49, 'DbCopyright' => 50, 'DbReportDatetime' => 51, 'DbReportLocation' => 52, 'DbReportOrganization' => 53, 'DbSubject' => 54, 'DbContributor' => 55, 'DbLanguage' => 56, 'DbFileExist' => 57, 'DbSoundcloudId' => 58, 'DbSoundcloudErrorCode' => 59, 'DbSoundcloudErrorMsg' => 60, 'DbSoundcloudLinkToFile' => 61, ), + BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbGunid' => 1, 'dbName' => 2, 'dbMime' => 3, 'dbFtype' => 4, 'dbDirectory' => 5, 'dbFilepath' => 6, 'dbState' => 7, 'dbCurrentlyaccessing' => 8, 'dbEditedby' => 9, 'dbMtime' => 10, 'dbUtime' => 11, 'dbLPtime' => 12, 'dbMd5' => 13, 'dbTrackTitle' => 14, 'dbArtistName' => 15, 'dbBitRate' => 16, 'dbSampleRate' => 17, 'dbFormat' => 18, 'dbLength' => 19, 'dbAlbumTitle' => 20, 'dbGenre' => 21, 'dbComments' => 22, 'dbYear' => 23, 'dbTrackNumber' => 24, 'dbChannels' => 25, 'dbUrl' => 26, 'dbBpm' => 27, 'dbRating' => 28, 'dbEncodedBy' => 29, 'dbDiscNumber' => 30, 'dbMood' => 31, 'dbLabel' => 32, 'dbComposer' => 33, 'dbEncoder' => 34, 'dbChecksum' => 35, 'dbLyrics' => 36, 'dbOrchestra' => 37, 'dbConductor' => 38, 'dbLyricist' => 39, 'dbOriginalLyricist' => 40, 'dbRadioStationName' => 41, 'dbInfoUrl' => 42, 'dbArtistUrl' => 43, 'dbAudioSourceUrl' => 44, 'dbRadioStationUrl' => 45, 'dbBuyThisUrl' => 46, 'dbIsrcNumber' => 47, 'dbCatalogNumber' => 48, 'dbOriginalArtist' => 49, 'dbCopyright' => 50, 'dbReportDatetime' => 51, 'dbReportLocation' => 52, 'dbReportOrganization' => 53, 'dbSubject' => 54, 'dbContributor' => 55, 'dbLanguage' => 56, 'dbFileExist' => 57, 'dbSoundcloudId' => 58, 'dbSoundcloudErrorCode' => 59, 'dbSoundcloudErrorMsg' => 60, 'dbSoundcloudLinkToFile' => 61, ), + BasePeer::TYPE_COLNAME => array (self::ID => 0, self::GUNID => 1, self::NAME => 2, self::MIME => 3, self::FTYPE => 4, self::DIRECTORY => 5, self::FILEPATH => 6, self::STATE => 7, self::CURRENTLYACCESSING => 8, self::EDITEDBY => 9, self::MTIME => 10, self::UTIME => 11, self::LPTIME => 12, self::MD5 => 13, self::TRACK_TITLE => 14, self::ARTIST_NAME => 15, self::BIT_RATE => 16, self::SAMPLE_RATE => 17, self::FORMAT => 18, self::LENGTH => 19, self::ALBUM_TITLE => 20, self::GENRE => 21, self::COMMENTS => 22, self::YEAR => 23, self::TRACK_NUMBER => 24, self::CHANNELS => 25, self::URL => 26, self::BPM => 27, self::RATING => 28, self::ENCODED_BY => 29, self::DISC_NUMBER => 30, self::MOOD => 31, self::LABEL => 32, self::COMPOSER => 33, self::ENCODER => 34, self::CHECKSUM => 35, self::LYRICS => 36, self::ORCHESTRA => 37, self::CONDUCTOR => 38, self::LYRICIST => 39, self::ORIGINAL_LYRICIST => 40, self::RADIO_STATION_NAME => 41, self::INFO_URL => 42, self::ARTIST_URL => 43, self::AUDIO_SOURCE_URL => 44, self::RADIO_STATION_URL => 45, self::BUY_THIS_URL => 46, self::ISRC_NUMBER => 47, self::CATALOG_NUMBER => 48, self::ORIGINAL_ARTIST => 49, self::COPYRIGHT => 50, self::REPORT_DATETIME => 51, self::REPORT_LOCATION => 52, self::REPORT_ORGANIZATION => 53, self::SUBJECT => 54, self::CONTRIBUTOR => 55, self::LANGUAGE => 56, self::FILE_EXIST => 57, self::SOUNDCLOUD_ID => 58, self::SOUNDCLOUD_ERROR_CODE => 59, self::SOUNDCLOUD_ERROR_MSG => 60, self::SOUNDCLOUD_LINK_TO_FILE => 61, ), + BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'GUNID' => 1, 'NAME' => 2, 'MIME' => 3, 'FTYPE' => 4, 'DIRECTORY' => 5, 'FILEPATH' => 6, 'STATE' => 7, 'CURRENTLYACCESSING' => 8, 'EDITEDBY' => 9, 'MTIME' => 10, 'UTIME' => 11, 'LPTIME' => 12, 'MD5' => 13, 'TRACK_TITLE' => 14, 'ARTIST_NAME' => 15, 'BIT_RATE' => 16, 'SAMPLE_RATE' => 17, 'FORMAT' => 18, 'LENGTH' => 19, 'ALBUM_TITLE' => 20, 'GENRE' => 21, 'COMMENTS' => 22, 'YEAR' => 23, 'TRACK_NUMBER' => 24, 'CHANNELS' => 25, 'URL' => 26, 'BPM' => 27, 'RATING' => 28, 'ENCODED_BY' => 29, 'DISC_NUMBER' => 30, 'MOOD' => 31, 'LABEL' => 32, 'COMPOSER' => 33, 'ENCODER' => 34, 'CHECKSUM' => 35, 'LYRICS' => 36, 'ORCHESTRA' => 37, 'CONDUCTOR' => 38, 'LYRICIST' => 39, 'ORIGINAL_LYRICIST' => 40, 'RADIO_STATION_NAME' => 41, 'INFO_URL' => 42, 'ARTIST_URL' => 43, 'AUDIO_SOURCE_URL' => 44, 'RADIO_STATION_URL' => 45, 'BUY_THIS_URL' => 46, 'ISRC_NUMBER' => 47, 'CATALOG_NUMBER' => 48, 'ORIGINAL_ARTIST' => 49, 'COPYRIGHT' => 50, 'REPORT_DATETIME' => 51, 'REPORT_LOCATION' => 52, 'REPORT_ORGANIZATION' => 53, 'SUBJECT' => 54, 'CONTRIBUTOR' => 55, 'LANGUAGE' => 56, 'FILE_EXIST' => 57, 'SOUNDCLOUD_ID' => 58, 'SOUNDCLOUD_ERROR_CODE' => 59, 'SOUNDCLOUD_ERROR_MSG' => 60, 'SOUNDCLOUD_LINK_TO_FILE' => 61, ), + BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'gunid' => 1, 'name' => 2, 'mime' => 3, 'ftype' => 4, 'directory' => 5, 'filepath' => 6, 'state' => 7, 'currentlyaccessing' => 8, 'editedby' => 9, 'mtime' => 10, 'utime' => 11, 'lptime' => 12, 'md5' => 13, 'track_title' => 14, 'artist_name' => 15, 'bit_rate' => 16, 'sample_rate' => 17, 'format' => 18, 'length' => 19, 'album_title' => 20, 'genre' => 21, 'comments' => 22, 'year' => 23, 'track_number' => 24, 'channels' => 25, 'url' => 26, 'bpm' => 27, 'rating' => 28, 'encoded_by' => 29, 'disc_number' => 30, 'mood' => 31, 'label' => 32, 'composer' => 33, 'encoder' => 34, 'checksum' => 35, 'lyrics' => 36, 'orchestra' => 37, 'conductor' => 38, 'lyricist' => 39, 'original_lyricist' => 40, 'radio_station_name' => 41, 'info_url' => 42, 'artist_url' => 43, 'audio_source_url' => 44, 'radio_station_url' => 45, 'buy_this_url' => 46, 'isrc_number' => 47, 'catalog_number' => 48, 'original_artist' => 49, 'copyright' => 50, 'report_datetime' => 51, 'report_location' => 52, 'report_organization' => 53, 'subject' => 54, 'contributor' => 55, 'language' => 56, 'file_exist' => 57, 'soundcloud_id' => 58, 'soundcloud_error_code' => 59, 'soundcloud_error_msg' => 60, 'soundcloud_link_to_file' => 61, ), + 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, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, ) ); /** @@ -330,6 +336,8 @@ abstract class BaseCcFilesPeer { $criteria->addSelectColumn(CcFilesPeer::CURRENTLYACCESSING); $criteria->addSelectColumn(CcFilesPeer::EDITEDBY); $criteria->addSelectColumn(CcFilesPeer::MTIME); + $criteria->addSelectColumn(CcFilesPeer::UTIME); + $criteria->addSelectColumn(CcFilesPeer::LPTIME); $criteria->addSelectColumn(CcFilesPeer::MD5); $criteria->addSelectColumn(CcFilesPeer::TRACK_TITLE); $criteria->addSelectColumn(CcFilesPeer::ARTIST_NAME); @@ -391,6 +399,8 @@ abstract class BaseCcFilesPeer { $criteria->addSelectColumn($alias . '.CURRENTLYACCESSING'); $criteria->addSelectColumn($alias . '.EDITEDBY'); $criteria->addSelectColumn($alias . '.MTIME'); + $criteria->addSelectColumn($alias . '.UTIME'); + $criteria->addSelectColumn($alias . '.LPTIME'); $criteria->addSelectColumn($alias . '.MD5'); $criteria->addSelectColumn($alias . '.TRACK_TITLE'); $criteria->addSelectColumn($alias . '.ARTIST_NAME'); diff --git a/airtime_mvc/application/models/airtime/om/BaseCcFilesQuery.php b/airtime_mvc/application/models/airtime/om/BaseCcFilesQuery.php index 86119f733..63cc2a0ba 100644 --- a/airtime_mvc/application/models/airtime/om/BaseCcFilesQuery.php +++ b/airtime_mvc/application/models/airtime/om/BaseCcFilesQuery.php @@ -17,6 +17,8 @@ * @method CcFilesQuery orderByDbCurrentlyaccessing($order = Criteria::ASC) Order by the currentlyaccessing column * @method CcFilesQuery orderByDbEditedby($order = Criteria::ASC) Order by the editedby column * @method CcFilesQuery orderByDbMtime($order = Criteria::ASC) Order by the mtime column + * @method CcFilesQuery orderByDbUtime($order = Criteria::ASC) Order by the utime column + * @method CcFilesQuery orderByDbLPtime($order = Criteria::ASC) Order by the lptime column * @method CcFilesQuery orderByDbMd5($order = Criteria::ASC) Order by the md5 column * @method CcFilesQuery orderByDbTrackTitle($order = Criteria::ASC) Order by the track_title column * @method CcFilesQuery orderByDbArtistName($order = Criteria::ASC) Order by the artist_name column @@ -78,6 +80,8 @@ * @method CcFilesQuery groupByDbCurrentlyaccessing() Group by the currentlyaccessing column * @method CcFilesQuery groupByDbEditedby() Group by the editedby column * @method CcFilesQuery groupByDbMtime() Group by the mtime column + * @method CcFilesQuery groupByDbUtime() Group by the utime column + * @method CcFilesQuery groupByDbLPtime() Group by the lptime column * @method CcFilesQuery groupByDbMd5() Group by the md5 column * @method CcFilesQuery groupByDbTrackTitle() Group by the track_title column * @method CcFilesQuery groupByDbArtistName() Group by the artist_name column @@ -166,6 +170,8 @@ * @method CcFiles findOneByDbCurrentlyaccessing(int $currentlyaccessing) Return the first CcFiles filtered by the currentlyaccessing column * @method CcFiles findOneByDbEditedby(int $editedby) Return the first CcFiles filtered by the editedby column * @method CcFiles findOneByDbMtime(string $mtime) Return the first CcFiles filtered by the mtime column + * @method CcFiles findOneByDbUtime(string $utime) Return the first CcFiles filtered by the utime column + * @method CcFiles findOneByDbLPtime(string $lptime) Return the first CcFiles filtered by the lptime column * @method CcFiles findOneByDbMd5(string $md5) Return the first CcFiles filtered by the md5 column * @method CcFiles findOneByDbTrackTitle(string $track_title) Return the first CcFiles filtered by the track_title column * @method CcFiles findOneByDbArtistName(string $artist_name) Return the first CcFiles filtered by the artist_name column @@ -227,6 +233,8 @@ * @method array findByDbCurrentlyaccessing(int $currentlyaccessing) Return CcFiles objects filtered by the currentlyaccessing column * @method array findByDbEditedby(int $editedby) Return CcFiles objects filtered by the editedby column * @method array findByDbMtime(string $mtime) Return CcFiles objects filtered by the mtime column + * @method array findByDbUtime(string $utime) Return CcFiles objects filtered by the utime column + * @method array findByDbLPtime(string $lptime) Return CcFiles objects filtered by the lptime column * @method array findByDbMd5(string $md5) Return CcFiles objects filtered by the md5 column * @method array findByDbTrackTitle(string $track_title) Return CcFiles objects filtered by the track_title column * @method array findByDbArtistName(string $artist_name) Return CcFiles objects filtered by the artist_name column @@ -658,6 +666,68 @@ abstract class BaseCcFilesQuery extends ModelCriteria return $this->addUsingAlias(CcFilesPeer::MTIME, $dbMtime, $comparison); } + /** + * Filter the query on the utime column + * + * @param string|array $dbUtime The value to use as filter. + * Accepts an associative array('min' => $minValue, 'max' => $maxValue) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return CcFilesQuery The current query, for fluid interface + */ + public function filterByDbUtime($dbUtime = null, $comparison = null) + { + if (is_array($dbUtime)) { + $useMinMax = false; + if (isset($dbUtime['min'])) { + $this->addUsingAlias(CcFilesPeer::UTIME, $dbUtime['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($dbUtime['max'])) { + $this->addUsingAlias(CcFilesPeer::UTIME, $dbUtime['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + return $this->addUsingAlias(CcFilesPeer::UTIME, $dbUtime, $comparison); + } + + /** + * Filter the query on the lptime column + * + * @param string|array $dbLPtime The value to use as filter. + * Accepts an associative array('min' => $minValue, 'max' => $maxValue) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return CcFilesQuery The current query, for fluid interface + */ + public function filterByDbLPtime($dbLPtime = null, $comparison = null) + { + if (is_array($dbLPtime)) { + $useMinMax = false; + if (isset($dbLPtime['min'])) { + $this->addUsingAlias(CcFilesPeer::LPTIME, $dbLPtime['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($dbLPtime['max'])) { + $this->addUsingAlias(CcFilesPeer::LPTIME, $dbLPtime['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + return $this->addUsingAlias(CcFilesPeer::LPTIME, $dbLPtime, $comparison); + } + /** * Filter the query on the md5 column * diff --git a/airtime_mvc/application/models/airtime/om/BaseCcMusicDirs.php b/airtime_mvc/application/models/airtime/om/BaseCcMusicDirs.php index b3ebe3c13..13d269db1 100644 --- a/airtime_mvc/application/models/airtime/om/BaseCcMusicDirs.php +++ b/airtime_mvc/application/models/airtime/om/BaseCcMusicDirs.php @@ -215,7 +215,6 @@ abstract class BaseCcMusicDirs extends BaseObject implements Persistent */ public function setExists($v) { - Logging::log("setting exists to ".print_r($v, true)); if ($v !== null) { $v = (boolean) $v; } diff --git a/airtime_mvc/application/models/airtime/om/BaseCcPlaylist.php b/airtime_mvc/application/models/airtime/om/BaseCcPlaylist.php index 222c1c6f4..d00e79d62 100644 --- a/airtime_mvc/application/models/airtime/om/BaseCcPlaylist.php +++ b/airtime_mvc/application/models/airtime/om/BaseCcPlaylist.php @@ -63,6 +63,18 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent */ protected $mtime; + /** + * The value for the utime field. + * @var string + */ + protected $utime; + + /** + * The value for the lptime field. + * @var string + */ + protected $lptime; + /** * The value for the creator field. * @var string @@ -205,6 +217,72 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent } } + /** + * Get the [optionally formatted] temporal [utime] column value. + * + * + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw DateTime object will be returned. + * @return mixed Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL + * @throws PropelException - if unable to parse/validate the date/time value. + */ + public function getDbUtime($format = 'Y-m-d H:i:s') + { + if ($this->utime === null) { + return null; + } + + + + try { + $dt = new DateTime($this->utime); + } catch (Exception $x) { + throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->utime, true), $x); + } + + if ($format === null) { + // Because propel.useDateTimeClass is TRUE, we return a DateTime object. + return $dt; + } elseif (strpos($format, '%') !== false) { + return strftime($format, $dt->format('U')); + } else { + return $dt->format($format); + } + } + + /** + * Get the [optionally formatted] temporal [lptime] column value. + * + * + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw DateTime object will be returned. + * @return mixed Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL + * @throws PropelException - if unable to parse/validate the date/time value. + */ + public function getDbLPtime($format = 'Y-m-d H:i:s') + { + if ($this->lptime === null) { + return null; + } + + + + try { + $dt = new DateTime($this->lptime); + } catch (Exception $x) { + throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->lptime, true), $x); + } + + if ($format === null) { + // Because propel.useDateTimeClass is TRUE, we return a DateTime object. + return $dt; + } elseif (strpos($format, '%') !== false) { + return strftime($format, $dt->format('U')); + } else { + return $dt->format($format); + } + } + /** * Get the [creator] column value. * @@ -378,6 +456,104 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent return $this; } // setDbMtime() + /** + * Sets the value of [utime] column to a normalized version of the date/time value specified. + * + * @param mixed $v string, integer (timestamp), or DateTime value. Empty string will + * be treated as NULL for temporal objects. + * @return CcPlaylist The current object (for fluent API support) + */ + public function setDbUtime($v) + { + // we treat '' as NULL for temporal objects because DateTime('') == DateTime('now') + // -- which is unexpected, to say the least. + if ($v === null || $v === '') { + $dt = null; + } elseif ($v instanceof DateTime) { + $dt = $v; + } else { + // some string/numeric value passed; we normalize that so that we can + // validate it. + try { + if (is_numeric($v)) { // if it's a unix timestamp + $dt = new DateTime('@'.$v, new DateTimeZone('UTC')); + // We have to explicitly specify and then change the time zone because of a + // DateTime bug: http://bugs.php.net/bug.php?id=43003 + $dt->setTimeZone(new DateTimeZone(date_default_timezone_get())); + } else { + $dt = new DateTime($v); + } + } catch (Exception $x) { + throw new PropelException('Error parsing date/time value: ' . var_export($v, true), $x); + } + } + + if ( $this->utime !== null || $dt !== null ) { + // (nested ifs are a little easier to read in this case) + + $currNorm = ($this->utime !== null && $tmpDt = new DateTime($this->utime)) ? $tmpDt->format('Y-m-d\\TH:i:sO') : null; + $newNorm = ($dt !== null) ? $dt->format('Y-m-d\\TH:i:sO') : null; + + if ( ($currNorm !== $newNorm) // normalized values don't match + ) + { + $this->utime = ($dt ? $dt->format('Y-m-d\\TH:i:sO') : null); + $this->modifiedColumns[] = CcPlaylistPeer::UTIME; + } + } // if either are not null + + return $this; + } // setDbUtime() + + /** + * Sets the value of [lptime] column to a normalized version of the date/time value specified. + * + * @param mixed $v string, integer (timestamp), or DateTime value. Empty string will + * be treated as NULL for temporal objects. + * @return CcPlaylist The current object (for fluent API support) + */ + public function setDbLPtime($v) + { + // we treat '' as NULL for temporal objects because DateTime('') == DateTime('now') + // -- which is unexpected, to say the least. + if ($v === null || $v === '') { + $dt = null; + } elseif ($v instanceof DateTime) { + $dt = $v; + } else { + // some string/numeric value passed; we normalize that so that we can + // validate it. + try { + if (is_numeric($v)) { // if it's a unix timestamp + $dt = new DateTime('@'.$v, new DateTimeZone('UTC')); + // We have to explicitly specify and then change the time zone because of a + // DateTime bug: http://bugs.php.net/bug.php?id=43003 + $dt->setTimeZone(new DateTimeZone(date_default_timezone_get())); + } else { + $dt = new DateTime($v); + } + } catch (Exception $x) { + throw new PropelException('Error parsing date/time value: ' . var_export($v, true), $x); + } + } + + if ( $this->lptime !== null || $dt !== null ) { + // (nested ifs are a little easier to read in this case) + + $currNorm = ($this->lptime !== null && $tmpDt = new DateTime($this->lptime)) ? $tmpDt->format('Y-m-d\\TH:i:sO') : null; + $newNorm = ($dt !== null) ? $dt->format('Y-m-d\\TH:i:sO') : null; + + if ( ($currNorm !== $newNorm) // normalized values don't match + ) + { + $this->lptime = ($dt ? $dt->format('Y-m-d\\TH:i:sO') : null); + $this->modifiedColumns[] = CcPlaylistPeer::LPTIME; + } + } // if either are not null + + return $this; + } // setDbLPtime() + /** * Set the value of [creator] column. * @@ -468,8 +644,10 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent $this->currentlyaccessing = ($row[$startcol + 3] !== null) ? (int) $row[$startcol + 3] : null; $this->editedby = ($row[$startcol + 4] !== null) ? (int) $row[$startcol + 4] : null; $this->mtime = ($row[$startcol + 5] !== null) ? (string) $row[$startcol + 5] : null; - $this->creator = ($row[$startcol + 6] !== null) ? (string) $row[$startcol + 6] : null; - $this->description = ($row[$startcol + 7] !== null) ? (string) $row[$startcol + 7] : null; + $this->utime = ($row[$startcol + 6] !== null) ? (string) $row[$startcol + 6] : null; + $this->lptime = ($row[$startcol + 7] !== null) ? (string) $row[$startcol + 7] : null; + $this->creator = ($row[$startcol + 8] !== null) ? (string) $row[$startcol + 8] : null; + $this->description = ($row[$startcol + 9] !== null) ? (string) $row[$startcol + 9] : null; $this->resetModified(); $this->setNew(false); @@ -478,7 +656,7 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent $this->ensureConsistency(); } - return $startcol + 8; // 8 = CcPlaylistPeer::NUM_COLUMNS - CcPlaylistPeer::NUM_LAZY_LOAD_COLUMNS). + return $startcol + 10; // 10 = CcPlaylistPeer::NUM_COLUMNS - CcPlaylistPeer::NUM_LAZY_LOAD_COLUMNS). } catch (Exception $e) { throw new PropelException("Error populating CcPlaylist object", $e); @@ -842,9 +1020,15 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent return $this->getDbMtime(); break; case 6: - return $this->getDbCreator(); + return $this->getDbUtime(); break; case 7: + return $this->getDbLPtime(); + break; + case 8: + return $this->getDbCreator(); + break; + case 9: return $this->getDbDescription(); break; default: @@ -877,8 +1061,10 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent $keys[3] => $this->getDbCurrentlyaccessing(), $keys[4] => $this->getDbEditedby(), $keys[5] => $this->getDbMtime(), - $keys[6] => $this->getDbCreator(), - $keys[7] => $this->getDbDescription(), + $keys[6] => $this->getDbUtime(), + $keys[7] => $this->getDbLPtime(), + $keys[8] => $this->getDbCreator(), + $keys[9] => $this->getDbDescription(), ); if ($includeForeignObjects) { if (null !== $this->aCcSubjs) { @@ -934,9 +1120,15 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent $this->setDbMtime($value); break; case 6: - $this->setDbCreator($value); + $this->setDbUtime($value); break; case 7: + $this->setDbLPtime($value); + break; + case 8: + $this->setDbCreator($value); + break; + case 9: $this->setDbDescription($value); break; } // switch() @@ -969,8 +1161,10 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent if (array_key_exists($keys[3], $arr)) $this->setDbCurrentlyaccessing($arr[$keys[3]]); if (array_key_exists($keys[4], $arr)) $this->setDbEditedby($arr[$keys[4]]); if (array_key_exists($keys[5], $arr)) $this->setDbMtime($arr[$keys[5]]); - if (array_key_exists($keys[6], $arr)) $this->setDbCreator($arr[$keys[6]]); - if (array_key_exists($keys[7], $arr)) $this->setDbDescription($arr[$keys[7]]); + if (array_key_exists($keys[6], $arr)) $this->setDbUtime($arr[$keys[6]]); + if (array_key_exists($keys[7], $arr)) $this->setDbLPtime($arr[$keys[7]]); + if (array_key_exists($keys[8], $arr)) $this->setDbCreator($arr[$keys[8]]); + if (array_key_exists($keys[9], $arr)) $this->setDbDescription($arr[$keys[9]]); } /** @@ -988,6 +1182,8 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent if ($this->isColumnModified(CcPlaylistPeer::CURRENTLYACCESSING)) $criteria->add(CcPlaylistPeer::CURRENTLYACCESSING, $this->currentlyaccessing); if ($this->isColumnModified(CcPlaylistPeer::EDITEDBY)) $criteria->add(CcPlaylistPeer::EDITEDBY, $this->editedby); if ($this->isColumnModified(CcPlaylistPeer::MTIME)) $criteria->add(CcPlaylistPeer::MTIME, $this->mtime); + if ($this->isColumnModified(CcPlaylistPeer::UTIME)) $criteria->add(CcPlaylistPeer::UTIME, $this->utime); + if ($this->isColumnModified(CcPlaylistPeer::LPTIME)) $criteria->add(CcPlaylistPeer::LPTIME, $this->lptime); if ($this->isColumnModified(CcPlaylistPeer::CREATOR)) $criteria->add(CcPlaylistPeer::CREATOR, $this->creator); if ($this->isColumnModified(CcPlaylistPeer::DESCRIPTION)) $criteria->add(CcPlaylistPeer::DESCRIPTION, $this->description); @@ -1056,6 +1252,8 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent $copyObj->setDbCurrentlyaccessing($this->currentlyaccessing); $copyObj->setDbEditedby($this->editedby); $copyObj->setDbMtime($this->mtime); + $copyObj->setDbUtime($this->utime); + $copyObj->setDbLPtime($this->lptime); $copyObj->setDbCreator($this->creator); $copyObj->setDbDescription($this->description); @@ -1309,6 +1507,8 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent $this->currentlyaccessing = null; $this->editedby = null; $this->mtime = null; + $this->utime = null; + $this->lptime = null; $this->creator = null; $this->description = null; $this->alreadyInSave = false; diff --git a/airtime_mvc/application/models/airtime/om/BaseCcPlaylistPeer.php b/airtime_mvc/application/models/airtime/om/BaseCcPlaylistPeer.php index 0e338bc39..067563842 100644 --- a/airtime_mvc/application/models/airtime/om/BaseCcPlaylistPeer.php +++ b/airtime_mvc/application/models/airtime/om/BaseCcPlaylistPeer.php @@ -26,7 +26,7 @@ abstract class BaseCcPlaylistPeer { const TM_CLASS = 'CcPlaylistTableMap'; /** The total number of columns. */ - const NUM_COLUMNS = 8; + const NUM_COLUMNS = 10; /** The number of lazy-loaded columns. */ const NUM_LAZY_LOAD_COLUMNS = 0; @@ -49,6 +49,12 @@ abstract class BaseCcPlaylistPeer { /** the column name for the MTIME field */ const MTIME = 'cc_playlist.MTIME'; + /** the column name for the UTIME field */ + const UTIME = 'cc_playlist.UTIME'; + + /** the column name for the LPTIME field */ + const LPTIME = 'cc_playlist.LPTIME'; + /** the column name for the CREATOR field */ const CREATOR = 'cc_playlist.CREATOR'; @@ -71,12 +77,12 @@ abstract class BaseCcPlaylistPeer { * e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id' */ private static $fieldNames = array ( - BasePeer::TYPE_PHPNAME => array ('DbId', 'DbName', 'DbState', 'DbCurrentlyaccessing', 'DbEditedby', 'DbMtime', 'DbCreator', 'DbDescription', ), - BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbName', 'dbState', 'dbCurrentlyaccessing', 'dbEditedby', 'dbMtime', 'dbCreator', 'dbDescription', ), - BasePeer::TYPE_COLNAME => array (self::ID, self::NAME, self::STATE, self::CURRENTLYACCESSING, self::EDITEDBY, self::MTIME, self::CREATOR, self::DESCRIPTION, ), - BasePeer::TYPE_RAW_COLNAME => array ('ID', 'NAME', 'STATE', 'CURRENTLYACCESSING', 'EDITEDBY', 'MTIME', 'CREATOR', 'DESCRIPTION', ), - BasePeer::TYPE_FIELDNAME => array ('id', 'name', 'state', 'currentlyaccessing', 'editedby', 'mtime', 'creator', 'description', ), - BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, ) + BasePeer::TYPE_PHPNAME => array ('DbId', 'DbName', 'DbState', 'DbCurrentlyaccessing', 'DbEditedby', 'DbMtime', 'DbUtime', 'DbLPtime', 'DbCreator', 'DbDescription', ), + BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbName', 'dbState', 'dbCurrentlyaccessing', 'dbEditedby', 'dbMtime', 'dbUtime', 'dbLPtime', 'dbCreator', 'dbDescription', ), + BasePeer::TYPE_COLNAME => array (self::ID, self::NAME, self::STATE, self::CURRENTLYACCESSING, self::EDITEDBY, self::MTIME, self::UTIME, self::LPTIME, self::CREATOR, self::DESCRIPTION, ), + BasePeer::TYPE_RAW_COLNAME => array ('ID', 'NAME', 'STATE', 'CURRENTLYACCESSING', 'EDITEDBY', 'MTIME', 'UTIME', 'LPTIME', 'CREATOR', 'DESCRIPTION', ), + BasePeer::TYPE_FIELDNAME => array ('id', 'name', 'state', 'currentlyaccessing', 'editedby', 'mtime', 'utime', 'lptime', 'creator', 'description', ), + BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, ) ); /** @@ -86,12 +92,12 @@ abstract class BaseCcPlaylistPeer { * e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0 */ private static $fieldKeys = array ( - BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbName' => 1, 'DbState' => 2, 'DbCurrentlyaccessing' => 3, 'DbEditedby' => 4, 'DbMtime' => 5, 'DbCreator' => 6, 'DbDescription' => 7, ), - BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbName' => 1, 'dbState' => 2, 'dbCurrentlyaccessing' => 3, 'dbEditedby' => 4, 'dbMtime' => 5, 'dbCreator' => 6, 'dbDescription' => 7, ), - BasePeer::TYPE_COLNAME => array (self::ID => 0, self::NAME => 1, self::STATE => 2, self::CURRENTLYACCESSING => 3, self::EDITEDBY => 4, self::MTIME => 5, self::CREATOR => 6, self::DESCRIPTION => 7, ), - BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'NAME' => 1, 'STATE' => 2, 'CURRENTLYACCESSING' => 3, 'EDITEDBY' => 4, 'MTIME' => 5, 'CREATOR' => 6, 'DESCRIPTION' => 7, ), - BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'name' => 1, 'state' => 2, 'currentlyaccessing' => 3, 'editedby' => 4, 'mtime' => 5, 'creator' => 6, 'description' => 7, ), - BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, ) + BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbName' => 1, 'DbState' => 2, 'DbCurrentlyaccessing' => 3, 'DbEditedby' => 4, 'DbMtime' => 5, 'DbUtime' => 6, 'DbLPtime' => 7, 'DbCreator' => 8, 'DbDescription' => 9, ), + BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbName' => 1, 'dbState' => 2, 'dbCurrentlyaccessing' => 3, 'dbEditedby' => 4, 'dbMtime' => 5, 'dbUtime' => 6, 'dbLPtime' => 7, 'dbCreator' => 8, 'dbDescription' => 9, ), + BasePeer::TYPE_COLNAME => array (self::ID => 0, self::NAME => 1, self::STATE => 2, self::CURRENTLYACCESSING => 3, self::EDITEDBY => 4, self::MTIME => 5, self::UTIME => 6, self::LPTIME => 7, self::CREATOR => 8, self::DESCRIPTION => 9, ), + BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'NAME' => 1, 'STATE' => 2, 'CURRENTLYACCESSING' => 3, 'EDITEDBY' => 4, 'MTIME' => 5, 'UTIME' => 6, 'LPTIME' => 7, 'CREATOR' => 8, 'DESCRIPTION' => 9, ), + BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'name' => 1, 'state' => 2, 'currentlyaccessing' => 3, 'editedby' => 4, 'mtime' => 5, 'utime' => 6, 'lptime' => 7, 'creator' => 8, 'description' => 9, ), + BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, ) ); /** @@ -169,6 +175,8 @@ abstract class BaseCcPlaylistPeer { $criteria->addSelectColumn(CcPlaylistPeer::CURRENTLYACCESSING); $criteria->addSelectColumn(CcPlaylistPeer::EDITEDBY); $criteria->addSelectColumn(CcPlaylistPeer::MTIME); + $criteria->addSelectColumn(CcPlaylistPeer::UTIME); + $criteria->addSelectColumn(CcPlaylistPeer::LPTIME); $criteria->addSelectColumn(CcPlaylistPeer::CREATOR); $criteria->addSelectColumn(CcPlaylistPeer::DESCRIPTION); } else { @@ -178,6 +186,8 @@ abstract class BaseCcPlaylistPeer { $criteria->addSelectColumn($alias . '.CURRENTLYACCESSING'); $criteria->addSelectColumn($alias . '.EDITEDBY'); $criteria->addSelectColumn($alias . '.MTIME'); + $criteria->addSelectColumn($alias . '.UTIME'); + $criteria->addSelectColumn($alias . '.LPTIME'); $criteria->addSelectColumn($alias . '.CREATOR'); $criteria->addSelectColumn($alias . '.DESCRIPTION'); } diff --git a/airtime_mvc/application/models/airtime/om/BaseCcPlaylistQuery.php b/airtime_mvc/application/models/airtime/om/BaseCcPlaylistQuery.php index 0ab594b7a..a61148f44 100644 --- a/airtime_mvc/application/models/airtime/om/BaseCcPlaylistQuery.php +++ b/airtime_mvc/application/models/airtime/om/BaseCcPlaylistQuery.php @@ -12,6 +12,8 @@ * @method CcPlaylistQuery orderByDbCurrentlyaccessing($order = Criteria::ASC) Order by the currentlyaccessing column * @method CcPlaylistQuery orderByDbEditedby($order = Criteria::ASC) Order by the editedby column * @method CcPlaylistQuery orderByDbMtime($order = Criteria::ASC) Order by the mtime column + * @method CcPlaylistQuery orderByDbUtime($order = Criteria::ASC) Order by the utime column + * @method CcPlaylistQuery orderByDbLPtime($order = Criteria::ASC) Order by the lptime column * @method CcPlaylistQuery orderByDbCreator($order = Criteria::ASC) Order by the creator column * @method CcPlaylistQuery orderByDbDescription($order = Criteria::ASC) Order by the description column * @@ -21,6 +23,8 @@ * @method CcPlaylistQuery groupByDbCurrentlyaccessing() Group by the currentlyaccessing column * @method CcPlaylistQuery groupByDbEditedby() Group by the editedby column * @method CcPlaylistQuery groupByDbMtime() Group by the mtime column + * @method CcPlaylistQuery groupByDbUtime() Group by the utime column + * @method CcPlaylistQuery groupByDbLPtime() Group by the lptime column * @method CcPlaylistQuery groupByDbCreator() Group by the creator column * @method CcPlaylistQuery groupByDbDescription() Group by the description column * @@ -45,6 +49,8 @@ * @method CcPlaylist findOneByDbCurrentlyaccessing(int $currentlyaccessing) Return the first CcPlaylist filtered by the currentlyaccessing column * @method CcPlaylist findOneByDbEditedby(int $editedby) Return the first CcPlaylist filtered by the editedby column * @method CcPlaylist findOneByDbMtime(string $mtime) Return the first CcPlaylist filtered by the mtime column + * @method CcPlaylist findOneByDbUtime(string $utime) Return the first CcPlaylist filtered by the utime column + * @method CcPlaylist findOneByDbLPtime(string $lptime) Return the first CcPlaylist filtered by the lptime column * @method CcPlaylist findOneByDbCreator(string $creator) Return the first CcPlaylist filtered by the creator column * @method CcPlaylist findOneByDbDescription(string $description) Return the first CcPlaylist filtered by the description column * @@ -54,6 +60,8 @@ * @method array findByDbCurrentlyaccessing(int $currentlyaccessing) Return CcPlaylist objects filtered by the currentlyaccessing column * @method array findByDbEditedby(int $editedby) Return CcPlaylist objects filtered by the editedby column * @method array findByDbMtime(string $mtime) Return CcPlaylist objects filtered by the mtime column + * @method array findByDbUtime(string $utime) Return CcPlaylist objects filtered by the utime column + * @method array findByDbLPtime(string $lptime) Return CcPlaylist objects filtered by the lptime column * @method array findByDbCreator(string $creator) Return CcPlaylist objects filtered by the creator column * @method array findByDbDescription(string $description) Return CcPlaylist objects filtered by the description column * @@ -319,6 +327,68 @@ abstract class BaseCcPlaylistQuery extends ModelCriteria return $this->addUsingAlias(CcPlaylistPeer::MTIME, $dbMtime, $comparison); } + /** + * Filter the query on the utime column + * + * @param string|array $dbUtime The value to use as filter. + * Accepts an associative array('min' => $minValue, 'max' => $maxValue) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return CcPlaylistQuery The current query, for fluid interface + */ + public function filterByDbUtime($dbUtime = null, $comparison = null) + { + if (is_array($dbUtime)) { + $useMinMax = false; + if (isset($dbUtime['min'])) { + $this->addUsingAlias(CcPlaylistPeer::UTIME, $dbUtime['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($dbUtime['max'])) { + $this->addUsingAlias(CcPlaylistPeer::UTIME, $dbUtime['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + return $this->addUsingAlias(CcPlaylistPeer::UTIME, $dbUtime, $comparison); + } + + /** + * Filter the query on the lptime column + * + * @param string|array $dbLPtime The value to use as filter. + * Accepts an associative array('min' => $minValue, 'max' => $maxValue) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return CcPlaylistQuery The current query, for fluid interface + */ + public function filterByDbLPtime($dbLPtime = null, $comparison = null) + { + if (is_array($dbLPtime)) { + $useMinMax = false; + if (isset($dbLPtime['min'])) { + $this->addUsingAlias(CcPlaylistPeer::LPTIME, $dbLPtime['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($dbLPtime['max'])) { + $this->addUsingAlias(CcPlaylistPeer::LPTIME, $dbLPtime['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + return $this->addUsingAlias(CcPlaylistPeer::LPTIME, $dbLPtime, $comparison); + } + /** * Filter the query on the creator column * diff --git a/airtime_mvc/build/schema.xml b/airtime_mvc/build/schema.xml index 0514df991..a0ea42312 100644 --- a/airtime_mvc/build/schema.xml +++ b/airtime_mvc/build/schema.xml @@ -46,6 +46,8 @@ + + @@ -215,6 +217,8 @@ + + diff --git a/airtime_mvc/build/sql/schema.sql b/airtime_mvc/build/sql/schema.sql index 0c74f9699..b52fe8ae1 100644 --- a/airtime_mvc/build/sql/schema.sql +++ b/airtime_mvc/build/sql/schema.sql @@ -72,6 +72,8 @@ CREATE TABLE "cc_files" "currentlyaccessing" INTEGER default 0 NOT NULL, "editedby" INTEGER, "mtime" TIMESTAMP(6), + "utime" TIMESTAMP(6), + "lptime" TIMESTAMP(6), "md5" CHAR(32), "track_title" VARCHAR(512), "artist_name" VARCHAR(512), @@ -288,6 +290,8 @@ CREATE TABLE "cc_playlist" "currentlyaccessing" INTEGER default 0 NOT NULL, "editedby" INTEGER, "mtime" TIMESTAMP(6), + "utime" TIMESTAMP(6), + "lptime" TIMESTAMP(6), "creator" VARCHAR(32), "description" VARCHAR(512), PRIMARY KEY ("id") diff --git a/airtime_mvc/public/css/datatables/css/ColReorder.css b/airtime_mvc/public/css/datatables/css/ColReorder.css new file mode 100644 index 000000000..6bb55e22c --- /dev/null +++ b/airtime_mvc/public/css/datatables/css/ColReorder.css @@ -0,0 +1,14 @@ +/* + * Namespace DTCR - "DataTables ColReorder" plug-in + */ + +table.DTCR_clonedTable { + background-color: white; + z-index: 998; +} + +div.DTCR_pointer { + width: 1px; + background-color: #5B5B5B; + z-index: 997; +} \ No newline at end of file diff --git a/airtime_mvc/public/css/datatables/css/ColVis.css b/airtime_mvc/public/css/datatables/css/ColVis.css new file mode 100644 index 000000000..95987b876 --- /dev/null +++ b/airtime_mvc/public/css/datatables/css/ColVis.css @@ -0,0 +1,75 @@ + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * ColVis styles + */ +.ColVis { + float: right; + margin-bottom: 1em; +} + +.ColVis_Button { + position: relative; + float: left; + margin-right: 3px; + padding: 3px 5px; + height: 30px; + background-color: #fff; + border: 1px solid #d0d0d0; + cursor: pointer; +} + +button.ColVis_Button::-moz-focus-inner { + border: none !important; + padding: 0; +} + +.ColVis_text_hover { + border: 1px solid #999; + background-color: #f0f0f0; +} + +div.ColVis_collectionBackground { + background-color: black; + z-index: 996; +} + +div.ColVis_collection { + position: relative; + width: 130px; + background-color: #999; + padding: 3px; + border: 1px solid #ccc; + z-index: 998; +} + +div.ColVis_collection button.ColVis_Button { + background-color: white; + width: 100%; + float: none; + margin-bottom: 2px; +} + +div.ColVis_catcher { + position: absolute; + z-index: 997; +} + +.disabled { + color: #999; +} + + + +button.ColVis_Button { + text-align: left; +} + +div.ColVis_collection button.ColVis_Button:hover { + border: 1px solid #999; + background-color: #f0f0f0; +} + +span.ColVis_radio { + display: inline-block; + width: 20px; +} diff --git a/airtime_mvc/public/css/media_library.css b/airtime_mvc/public/css/media_library.css index dbef3052a..925baa36a 100644 --- a/airtime_mvc/public/css/media_library.css +++ b/airtime_mvc/public/css/media_library.css @@ -66,4 +66,12 @@ -moz-user-select: none; -o-user-select: none; user-select: none; -} \ No newline at end of file +} + +.datatable_checkbox { + text-align: center; +} + +.datatable_checkbox .DataTables_sort_wrapper { + text-align: center; +} diff --git a/airtime_mvc/public/css/styles.css b/airtime_mvc/public/css/styles.css index 7b95307f7..e2acc5daa 100644 --- a/airtime_mvc/public/css/styles.css +++ b/airtime_mvc/public/css/styles.css @@ -607,10 +607,10 @@ dl.inline-list dd { } .dataTables_filter input { background: url("images/search_auto_bg.png") no-repeat scroll 0 0 #DDDDDD; - width: 60%; - border: 1px solid #5B5B5B; - margin: 0; - padding: 4px 3px 4px 25px; + width: 60%; + border: 1px solid #5B5B5B; + margin-left: -8px; + padding: 4px 3px 4px 25px; } .dataTables_length select { background-color: #DDDDDD; @@ -622,6 +622,30 @@ dl.inline-list dd { padding: 2px 2px 2px 0; vertical-align: top; } +#library_display thead th, #library_display tbody td { + cursor: pointer; +} +#library_display thead th.library_checkbox, +#library_display thead th.library_id, +#library_display thead th.library_title { + cursor: default; +} + +.ColVis.TableTools .ui-button { + height: 21px; +} +button.ColVis_Button.ColVis_ShowAll { + text-align: center; + margin-top: 10px; +} +.library_toolbar .ui-button, .ColVis.TableTools .ui-button { + float: right; + text-align:center; + font-size:12px; + font-weight:normal; + padding: 0.2em 1em; + margin: 0.5em 0.2em -0.5em 0.2em; +} /*----END Data Table----*/ diff --git a/airtime_mvc/public/js/airtime/library/library.js b/airtime_mvc/public/js/airtime/library/library.js index eefa73ccf..aec137914 100644 --- a/airtime_mvc/public/js/airtime/library/library.js +++ b/airtime_mvc/public/js/airtime/library/library.js @@ -1,13 +1,17 @@ +var dTable; +var checkedCount = 0; +var checkedPLCount = 0; + //used by jjmenu function getId() { - var tr_id = $(this.triggerElement).attr("id"); + var tr_id = $(this.triggerElement).parent().attr("id"); tr_id = tr_id.split("_"); return tr_id[1]; } function getType() { - var tr_id = $(this.triggerElement).attr("id"); + var tr_id = $(this.triggerElement).parent().attr("id"); tr_id = tr_id.split("_"); return tr_id[0]; @@ -30,8 +34,20 @@ function deleteAudioClip(json) { return; } - deleteItem("au", json.id); + if (json.ids != undefined) { + for (var i = json.ids.length - 1; i >= 0; i--) { + deleteItem("au", json.ids[i]); + } + } else if (json.id != undefined) { + deleteItem("au", json.id); + } location.reload(true); +} + +function confirmDeleteGroup() { + if(confirm('Are you sure you want to delete the selected items?')){ + groupDelete(); + } } //callbacks called by jjmenu @@ -73,11 +89,17 @@ function checkImportStatus(){ function deletePlaylist(json) { if(json.message) { - alert(json.message); - return; + alert(json.message); + return; } - - deleteItem("pl", json.id); + + if (json.ids != undefined) { + for (var i = json.ids.length - 1; i >= 0; i--) { + deleteItem("pl", json.ids[i]); + } + } else if (json.id != undefined) { + deleteItem("pl", json.id); + } window.location.reload(); } //end callbacks called by jjmenu @@ -90,7 +112,7 @@ function addLibraryItemEvents() { cursor: 'pointer' }); - $('#library_display tbody tr') + $('#library_display tbody tr td').not('[class=library_checkbox]') .jjmenu("click", [{get:"/Library/context-menu/format/json/id/#id#/type/#type#"}], {id: getId, type: getType}, @@ -101,36 +123,36 @@ function addLibraryItemEvents() { function dtRowCallback( nRow, aData, iDisplayIndex, iDisplayIndexFull ) { var id, type, once; - type = aData[6].substring(0,2); - id = aData[0]; - + type = aData["ftype"].substring(0,2); + id = aData["id"]; + if(type == "au") { - $('td:eq(5)', nRow).html( '' ); - } - else if(type == "pl") { - $('td:eq(5)', nRow).html( '' ); + $('td.library_type', nRow).html( '' ); + } else if(type == "pl") { + $('td.library_type', nRow).html( '' ); } - $(nRow).attr("id", type+'_'+id); + $(nRow).attr("id", type+'_'+id); - // insert id on lenth field - $('td:eq(4)', nRow).attr("id", "length"); + // insert id on lenth field + $('td.library_length', nRow).attr("id", "length"); - return nRow; + return nRow; } function dtDrawCallback() { - addLibraryItemEvents(); - addMetadataQtip(); - saveNumEntriesSetting(); + addLibraryItemEvents(); + addMetadataQtip(); + saveNumEntriesSetting(); + setupGroupActions(); } function addProgressIcon(id) { - if($("#au_"+id).find("td:eq(0)").find("span").length > 0){ - $("#au_"+id).find("td:eq(0)").find("span").removeClass(); + if($("#au_"+id).find("td.library_title").find("span").length > 0){ + $("#au_"+id).find("td.library_title").find("span").removeClass(); $("span[id="+id+"]").addClass("small-icon progress"); }else{ - $("#au_"+id).find("td:eq(0)").append('') + $("#au_"+id).find("td.library_title").append('') } } @@ -229,7 +251,7 @@ function addQtipToSCIcons(){ function addMetadataQtip(){ var tableRow = $('#library_display tbody tr'); tableRow.each(function(){ - var title = $(this).find('td:eq(0)').html() + var title = $(this).find('td.library_title').html() var info = $(this).attr("id") info = info.split("_"); var id = info[1]; @@ -297,31 +319,216 @@ function getNumEntriesPreference(data) { return parseInt(data.libraryInit.numEntries); } +function groupAdd() { + if (checkedPLCount > 0) { + alert("Can't add playlist to another playlist"); + return; + } + disableGroupBtn('library_group_add'); + + var ids = new Array(); + var addGroupUrl = '/Playlist/add-group'; + var newSPLUrl = '/Playlist/new/format/json'; + var dirty = true; + $('#library_display tbody tr').each(function() { + var idSplit = $(this).attr('id').split("_"); + var id = idSplit.pop(); + var type = idSplit.pop(); + if (dirty && $(this).find(":checkbox").attr("checked")) { + if (type == "au") { + ids.push(id); + } else if (type == "pl") { + alert("Can't add playlist to another playlist"); + dirty = false; + } + } + }); + + if (dirty && ids.length > 0) { + stopAudioPreview(); + + if ($('#spl_sortable').length == 0) { + $.post(newSPLUrl, function(json) { + openDiffSPL(json); + redrawDataTablePage(); + + $.post(addGroupUrl, {format: "json", ids: ids}, setSPLContent); + }); + } else { + $.post(addGroupUrl, {format: "json", ids: ids}, setSPLContent); + } + } +} + +function groupDelete() { + disableGroupBtn('library_group_delete'); + + var auIds = new Array(); + var plIds = new Array(); + var auUrl = '/Library/delete-group'; + var plUrl = '/Playlist/delete-group'; + var dirty = true; + $('#library_display tbody tr').each(function() { + var idSplit = $(this).attr('id').split("_"); + var id = idSplit.pop(); + var type = idSplit.pop(); + if (dirty && $(this).find(":checkbox").attr("checked")) { + if (type == "au") { + auIds.push(id); + } else if (type == "pl") { + plIds.push(id); + } + } + }); + + if (dirty && (auIds.length > 0 || plIds.length > 0)) { + stopAudioPreview(); + + if (auIds.length > 0) { + $.post(auUrl, {format: "json", ids: auIds}, deleteAudioClip); + } + if (plIds.length > 0) { + $.post(plUrl, {format: "json", ids: plIds}, deletePlaylist); + } + } +} + +function toggleAll() { + var checked = $(this).attr("checked"); + $('#library_display tr').each(function() { + var idSplit = $(this).attr('id').split("_"); + var type = idSplit[0]; + $(this).find(":checkbox").attr("checked", checked); + if (checked) { + if (type == "pl") { + checkedPLCount++; + } + $(this).addClass('selected'); + } else { + if (type == "pl") { + checkedPLCount--; + } + $(this).removeClass('selected'); + } + }); + + if (checked) { + checkedCount = $('#library_display tbody tr').size(); + enableGroupBtn('library_group_add', groupAdd); + enableGroupBtn('library_group_delete', confirmDeleteGroup); + } else { + checkedCount = 0; + checkedPLCount = 0; + disableGroupBtn('library_group_add'); + disableGroupBtn('library_group_delete'); + } +} + +function enableGroupBtn(btnId, func) { + btnId = '#' + btnId; + if ($(btnId).hasClass('ui-state-disabled')) { + $(btnId).removeClass('ui-state-disabled'); + $(btnId).click(func); + } +} + +function disableGroupBtn(btnId) { + btnId = '#' + btnId; + if (!$(btnId).hasClass('ui-state-disabled')) { + $(btnId).addClass('ui-state-disabled'); + $(btnId).unbind("click"); + } +} + +function checkBoxChanged() { + var cbAll = $('#library_display thead').find(":checkbox"); + var cbAllChecked = cbAll.attr("checked"); + var checked = $(this).attr("checked"); + var size = $('#library_display tbody tr').size(); + var idSplit = $(this).parent().parent().attr('id').split("_"); + var type = idSplit[0]; + if (checked) { + if (checkedCount < size) { + checkedCount++; + } + if (type == "pl" && checkedPLCount < size) { + checkedPLCount++; + } + enableGroupBtn('library_group_add', groupAdd); + enableGroupBtn('library_group_delete', confirmDeleteGroup); + $(this).parent().parent().addClass('selected'); + } else { + if (checkedCount > 0) { + checkedCount--; + } + if (type == "pl" && checkedPLCount > 0) { + checkedPLCount--; + } + if (checkedCount == 0) { + disableGroupBtn('library_group_add'); + disableGroupBtn('library_group_delete'); + } + $(this).parent().parent().removeClass('selected'); + } + + if (cbAllChecked && checkedCount < size) { + cbAll.attr("checked", false); + } else if (!cbAllChecked && checkedCount == size) { + cbAll.attr("checked", true); + } + + +} + +function setupGroupActions() { + checkedCount = 0; + $('#library_display tr:nth-child(1)').find(":checkbox").attr("checked", false); + $('#library_display thead').find(":checkbox").change(toggleAll); + $('#library_display tbody tr').each(function() { + $(this).find(":checkbox").change(checkBoxChanged); + }); + + disableGroupBtn('library_group_add'); + disableGroupBtn('library_group_delete'); +} + +function fnShowHide(iCol) { + /* Get the DataTables object again - this is not a recreation, just a get of the object */ + var oTable = dTable; + + var bVis = oTable.fnSettings().aoColumns[iCol].bVisible; + oTable.fnSetColumnVis( iCol, bVis ? false : true ); +} + function createDataTable(data) { - var dTable = $('#library_display').dataTable( { + dTable = $('#library_display').dataTable( { "bProcessing": true, "bServerSide": true, "sAjaxSource": "/Library/contents/format/json", - "fnServerData": function ( sSource, aoData, fnCallback ) { + "fnServerData": function ( sSource, aoData, testCallback ) { $.ajax( { "dataType": 'json', "type": "POST", "url": sSource, "data": aoData, - "success": fnCallback + "success": testCallback } ); }, "fnRowCallback": dtRowCallback, "fnDrawCallback": dtDrawCallback, "aoColumns": [ - /* Id */ { "sName": "id", "bSearchable": false, "bVisible": false }, - /* Title */ { "sTitle": "Title", "sName": "track_title" }, - /* Creator */ { "sTitle": "Creator", "sName": "artist_name" }, - /* Album */ { "sTitle": "Album", "sName": "album_title" }, - /* Genre */ { "sTitle": "Genre", "sName": "genre" }, - /* Length */ { "sTitle": "Length", "sName": "length" }, - /* Type */ { "sTitle": "Type", "sName": "ftype", "bSearchable": false } - ], + /* Checkbox */ {"sTitle": "", "bSortable": false, "bSearchable": false, "mDataProp": "checkbox", "sWidth": "25px", "sClass": "library_checkbox"}, + /* Id */ {"sName": "id", "bSearchable": false, "bVisible": false, "mDataProp": "id", "sClass": "library_id"}, + /* Title */ {"sTitle": "Title", "sName": "track_title", "mDataProp": "track_title", "sClass": "library_title"}, + /* Creator */ {"sTitle": "Creator", "sName": "artist_name", "mDataProp": "artist_name", "sClass": "library_creator"}, + /* Album */ {"sTitle": "Album", "sName": "album_title", "mDataProp": "album_title", "sClass": "library_album"}, + /* Genre */ {"sTitle": "Genre", "sName": "genre", "mDataProp": "genre", "sWidth": "10%", "sClass": "library_genre"}, + /* Year */ {"sTitle": "Year", "sName": "year", "mDataProp": "year", "sWidth": "8%", "sClass": "library_year"}, + /* Length */ {"sTitle": "Length", "sName": "length", "mDataProp": "length", "sWidth": "10%", "sClass": "library_length"}, + /* Type */ {"sTitle": "Type", "sName": "ftype", "bSearchable": false, "mDataProp": "ftype", "sWidth": "9%", "sClass": "library_type"}, + /* Upload Time */ {"sTitle": "Upload Time", "sName": "utime", "mDataProp": "utime", "sClass": "library_upload_time"}, + /* Last Modified */ {"sTitle": "Last Modified", "sName": "mtime", "bVisible": false, "mDataProp": "mtime", "sClass": "library_modified_time"}, + ], "aaSorting": [[2,'asc']], "sPaginationType": "full_numbers", "bJQueryUI": true, @@ -330,9 +537,31 @@ function createDataTable(data) { "sSearch": "" }, "iDisplayLength": getNumEntriesPreference(data), - "bStateSave": true + "bStateSave": true, + // R = ColReorder, C = ColVis, see datatables doc for others + "sDom": 'Rlfr<"H"C<"library_toolbar">>t<"F"ip>', + "oColVis": { + "buttonText": "Show/Hide Columns", + "sAlign": "right", + "aiExclude": [0, 1, 2], + "sSize": "css", + "bShowAll": true + }, + "oColReorder": { + "aiOrder": [ 0, 2, 3, 4, 5, 6, 7, 8, 9, 10 ] /* code this */, + "iFixedColumns": 3 + } }); dTable.fnSetFilteringDelay(350); + + $("div.library_toolbar").html('Reset Order' + + 'Delete' + + 'Add'); + + $('#library_order_reset').click(function() { + ColReorder.fnReset( dTable ); + return false; + }); } $(document).ready(function() { @@ -341,9 +570,9 @@ $(document).ready(function() { $.ajax({ url: "/Api/library-init/format/json", dataType:"json", success:createDataTable, error:function(jqXHR, textStatus, errorThrown){}}); - checkImportStatus() + checkImportStatus(); setInterval( "checkImportStatus()", 5000 ); setInterval( "checkSCUploadStatus()", 5000 ); - + addQtipToSCIcons() }); diff --git a/airtime_mvc/public/js/airtime/library/spl.js b/airtime_mvc/public/js/airtime/library/spl.js index 030b4a03f..1e73592b3 100644 --- a/airtime_mvc/public/js/airtime/library/spl.js +++ b/airtime_mvc/public/js/airtime/library/spl.js @@ -449,6 +449,9 @@ function setUpSPL() { } $("#fieldset-metadate_change").addClass("closed"); + + // update the "Last Modified" time for this playlist + redrawDataTablePage(); }); }); diff --git a/airtime_mvc/public/js/datatables/plugin/dataTables.ColReorder.js b/airtime_mvc/public/js/datatables/plugin/dataTables.ColReorder.js new file mode 100644 index 000000000..95c39fcec --- /dev/null +++ b/airtime_mvc/public/js/datatables/plugin/dataTables.ColReorder.js @@ -0,0 +1,987 @@ +/* + * File: ColReorder.js + * Version: 1.0.4 + * CVS: $Id$ + * Description: Controls for column visiblity in DataTables + * Author: Allan Jardine (www.sprymedia.co.uk) + * Created: Wed Sep 15 18:23:29 BST 2010 + * Modified: $Date$ by $Author$ + * Language: Javascript + * License: GPL v2 or BSD 3 point style + * Project: DataTables + * Contact: www.sprymedia.co.uk/contact + * + * Copyright 2010-2011 Allan Jardine, all rights reserved. + * + * This source file is free software, under either the GPL v2 license or a + * BSD style license, available at: + * http://datatables.net/license_gpl2 + * http://datatables.net/license_bsd + * + */ + + +(function($, window, document) { + + +/** + * Switch the key value pairing of an index array to be value key (i.e. the old value is now the + * key). For example consider [ 2, 0, 1 ] this would be returned as [ 1, 2, 0 ]. + * @method fnInvertKeyValues + * @param array aIn Array to switch around + * @returns array + */ +function fnInvertKeyValues( aIn ) +{ + var aRet=[]; + for ( var i=0, iLen=aIn.length ; i= iCols ) + { + this.oApi._fnLog( oSettings, 1, "ColReorder 'from' index is out of bounds: "+iFrom ); + return; + } + + if ( iTo < 0 || iTo >= iCols ) + { + this.oApi._fnLog( oSettings, 1, "ColReorder 'to' index is out of bounds: "+iTo ); + return; + } + + /* + * Calculate the new column array index, so we have a mapping between the old and new + */ + var aiMapping = []; + for ( i=0, iLen=iCols ; i this.s.fixed-1 ) + { + this._fnMouseListener( i, this.s.dt.aoColumns[i].nTh ); + } + + /* Mark the original column order for later reference */ + this.s.dt.aoColumns[i]._ColReorder_iOrigCol = i; + } + + /* State saving */ + this.s.dt.aoStateSave.push( { + "fn": function (oS, sVal) { + return that._fnStateSave.call( that, sVal ); + }, + "sName": "ColReorder_State" + } ); + + /* An initial column order has been specified */ + var aiOrder = null; + if ( typeof this.s.init.aiOrder != 'undefined' ) + { + aiOrder = this.s.init.aiOrder.slice(); + } + + /* State loading, overrides the column order given */ + if ( this.s.dt.oLoadedState && typeof this.s.dt.oLoadedState.ColReorder != 'undefined' && + this.s.dt.oLoadedState.ColReorder.length == this.s.dt.aoColumns.length ) + { + aiOrder = this.s.dt.oLoadedState.ColReorder; + } + + /* If we have an order to apply - do so */ + if ( aiOrder ) + { + /* We might be called during or after the DataTables initialisation. If before, then we need + * to wait until the draw is done, if after, then do what we need to do right away + */ + if ( !that.s.dt._bInitComplete ) + { + var bDone = false; + this.s.dt.aoDrawCallback.push( { + "fn": function () { + if ( !that.s.dt._bInitComplete && !bDone ) + { + bDone = true; + var resort = fnInvertKeyValues( aiOrder ); + that._fnOrderColumns.call( that, resort ); + } + }, + "sName": "ColReorder_Pre" + } ); + } + else + { + var resort = fnInvertKeyValues( aiOrder ); + that._fnOrderColumns.call( that, resort ); + } + } + }, + + + /** + * Set the column order from an array + * @method _fnOrderColumns + * @param array a An array of integers which dictate the column order that should be applied + * @returns void + * @private + */ + "_fnOrderColumns": function ( a ) + { + if ( a.length != this.s.dt.aoColumns.length ) + { + this.s.dt.oInstance.oApi._fnLog( oDTSettings, 1, "ColReorder - array reorder does not "+ + "match known number of columns. Skipping." ); + return; + } + + for ( var i=0, iLen=a.length ; i 0 ) + { + this.dom.drag.removeChild( this.dom.drag.getElementsByTagName('caption')[0] ); + } + while ( this.dom.drag.getElementsByTagName('tbody').length > 0 ) + { + this.dom.drag.removeChild( this.dom.drag.getElementsByTagName('tbody')[0] ); + } + while ( this.dom.drag.getElementsByTagName('tfoot').length > 0 ) + { + this.dom.drag.removeChild( this.dom.drag.getElementsByTagName('tfoot')[0] ); + } + + $('thead tr:eq(0)', this.dom.drag).each( function () { + $('th:not(:eq('+that.s.mouse.targetIndex+'))', this).remove(); + } ); + $('tr', this.dom.drag).height( $('tr:eq(0)', that.s.dt.nTHead).height() ); + + $('thead tr:gt(0)', this.dom.drag).remove(); + + $('thead th:eq(0)', this.dom.drag).each( function (i) { + this.style.width = $('th:eq('+that.s.mouse.targetIndex+')', that.s.dt.nTHead).width()+"px"; + } ); + + this.dom.drag.style.position = "absolute"; + this.dom.drag.style.top = "0px"; + this.dom.drag.style.left = "0px"; + this.dom.drag.style.width = $('th:eq('+that.s.mouse.targetIndex+')', that.s.dt.nTHead).outerWidth()+"px"; + + + this.dom.pointer = document.createElement( 'div' ); + this.dom.pointer.className = "DTCR_pointer"; + this.dom.pointer.style.position = "absolute"; + + if ( this.s.dt.oScroll.sX === "" && this.s.dt.oScroll.sY === "" ) + { + this.dom.pointer.style.top = $(this.s.dt.nTable).offset().top+"px"; + this.dom.pointer.style.height = $(this.s.dt.nTable).height()+"px"; + } + else + { + this.dom.pointer.style.top = $('div.dataTables_scroll', this.s.dt.nTableWrapper).offset().top+"px"; + this.dom.pointer.style.height = $('div.dataTables_scroll', this.s.dt.nTableWrapper).height()+"px"; + } + + document.body.appendChild( this.dom.pointer ); + document.body.appendChild( this.dom.drag ); + } +}; + + + + + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Static parameters + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +/** + * Array of all ColReorder instances for later reference + * @property ColReorder.aoInstances + * @type array + * @default [] + * @static + */ +ColReorder.aoInstances = []; + + + + + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Static functions + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +/** + * Reset the column ordering for a DataTables instance + * @method ColReorder.fnReset + * @param object oTable DataTables instance to consider + * @returns void + * @static + */ +ColReorder.fnReset = function ( oTable ) +{ + for ( var i=0, iLen=ColReorder.aoInstances.length ; i