Preferences updated.
";
}
}
$this->view->form = $form;
}
+
+ public function directoryConfigAction()
+ {
+ $request = $this->getRequest();
+ $baseUrl = $request->getBaseUrl();
+
+ $this->view->headScript()->appendFile($baseUrl.'/js/serverbrowse/serverbrowser.js','text/javascript');
+ $this->view->headScript()->appendFile($baseUrl.'/js/airtime/preferences/preferences.js','text/javascript');
+
+ $watched_dirs_pref = new Application_Form_WatchedDirPreferences();
+ $watched_dirs_pref->setWatchedDirs();
+
+ $this->view->form = $watched_dirs_pref;
+ }
+
+ public function serverBrowseAction()
+ {
+ $request = $this->getRequest();
+ $path = $request->getParam("path", null);
+
+ $result = array();
+
+ if(is_null($path))
+ {
+ $element = array();
+ $element["name"] = "path should be specified";
+ $element["isFolder"] = false;
+ $element["isError"] = true;
+ $result[$path] = $element;
+ }
+ else
+ {
+ $path = $path.'/';
+ $handle = opendir($path);
+ while (false !== ($file = readdir($handle))) {
+ if ($file != "." && $file != "..") {
+ //only show directories that aren't private.
+ if (is_dir($path.$file) && substr($file, 0, 1) != ".") {
+ $element = array();
+ $element["name"] = $file;
+ $element["isFolder"] = true;
+ $element["isError"] = false;
+ $result[$file] = $element;
+ }
+ }
+ }
+ }
+ ksort($result);
+ //returns format serverBrowse is looking for.
+ die(json_encode($result));
+ }
+
+ public function reloadWatchDirectoryAction()
+ {
+ $chosen = $this->getRequest()->getParam("dir");
+ $watched_dirs_form = new Application_Form_WatchedDirPreferences();
+ $watched_dirs_form->populate(array('watchedFolder' => $chosen));
+ $bool = $watched_dirs_form->verifyChosenFolder();
+
+ if ($bool === true) {
+ MusicDir::addWatchedDir($chosen);
+ $data = array();
+ $data["directory"] = $chosen;
+ RabbitMq::SendMessageToMediaMonitor("new_watch", $data);
+ }
+
+ $watched_dirs_form->setWatchedDirs();
+
+ $this->view->subform = $watched_dirs_form->render();
+ }
+
+ public function removeWatchDirectoryAction()
+ {
+ $chosen = $this->getRequest()->getParam("dir");
+
+ $dir = MusicDir::getDirByPath($chosen);
+ $dir->remove();
+
+ $data = array();
+ $data["directory"] = $chosen;
+ RabbitMq::SendMessageToMediaMonitor("remove_watch", $data);
+ }
}
diff --git a/airtime_mvc/application/forms/GeneralPreferences.php b/airtime_mvc/application/forms/GeneralPreferences.php
index ffac3e911..5646f4399 100644
--- a/airtime_mvc/application/forms/GeneralPreferences.php
+++ b/airtime_mvc/application/forms/GeneralPreferences.php
@@ -59,17 +59,6 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm
$third_party_api->setDecorators(array('ViewHelper'));
$this->addElement($third_party_api);
- //Default station fade
- $this->addElement('text', 'watchedFolder', array(
- 'class' => 'input_text',
- 'label' => 'WatchedFolder:',
- 'required' => false,
- 'filters' => array('StringTrim'),
- 'value' => Application_Model_Preference::GetWatchedDirectory(),
- 'decorators' => array(
- 'ViewHelper'
- )
- ));
}
diff --git a/airtime_mvc/application/forms/Preferences.php b/airtime_mvc/application/forms/Preferences.php
index e329e48ff..646b77190 100644
--- a/airtime_mvc/application/forms/Preferences.php
+++ b/airtime_mvc/application/forms/Preferences.php
@@ -11,7 +11,7 @@ class Application_Form_Preferences extends Zend_Form
$this->setDecorators(array(
array('ViewScript', array('viewScript' => 'form/preferences.phtml'))
));
-
+
$general_pref = new Application_Form_GeneralPreferences();
$this->addSubForm($general_pref, 'preferences_general');
@@ -25,6 +25,6 @@ class Application_Form_Preferences extends Zend_Form
'decorators' => array(
'ViewHelper'
)
- ));
+ ));
}
}
diff --git a/airtime_mvc/application/forms/WatchedDirPreferences.php b/airtime_mvc/application/forms/WatchedDirPreferences.php
new file mode 100644
index 000000000..dc7f64a91
--- /dev/null
+++ b/airtime_mvc/application/forms/WatchedDirPreferences.php
@@ -0,0 +1,58 @@
+setDecorators(array(
+ array('ViewScript', array('viewScript' => 'form/preferences_watched_dirs.phtml'))
+ ));
+
+ $this->addElement('text', 'watchedFolder', array(
+ 'class' => 'input_text',
+ 'label' => 'Choose a Folder to Watch:',
+ 'required' => false,
+ 'filters' => array('StringTrim'),
+ 'value' => '',
+ 'decorators' => array(
+ 'ViewHelper'
+ )
+ ));
+ }
+
+ public function verifyChosenFolder() {
+
+ $element = $this->getElement('watchedFolder');
+
+ if (!is_dir($element->getValue())) {
+ $element->setErrors(array('Not a valid Directory'));
+ return false;
+ }
+ else {
+ $element->setValue("");
+ return true;
+ }
+
+ }
+
+ public function setWatchedDirs() {
+
+ $watched_dirs = MusicDir::getWatchedDirs();
+ $i = 1;
+ foreach($watched_dirs as $dir) {
+
+ $text = new Zend_Form_Element_Text("watched_dir_$i");
+ $text->setAttrib('class', 'input_text');
+ $text->addFilter('StringTrim');
+ $text->setValue($dir->getDirectory());
+ $text->setDecorators(array('ViewHelper'));
+ $this->addElement($text);
+
+ $i = $i + 1;
+ }
+ }
+
+
+}
+
diff --git a/airtime_mvc/application/models/MusicDir.php b/airtime_mvc/application/models/MusicDir.php
new file mode 100644
index 000000000..bb748b885
--- /dev/null
+++ b/airtime_mvc/application/models/MusicDir.php
@@ -0,0 +1,148 @@
+_dir->getId();
+ }
+
+ public function getType()
+ {
+ return $this->_dir->getType();
+ }
+
+ public function setType($type)
+ {
+ $this->_dir->setType($type);
+ }
+
+ public function getDirectory()
+ {
+ return $this->_dir->getDirectory();
+ }
+
+ public function setDirectory($dir)
+ {
+ $this->_dir->setDirectory($dir);
+ }
+
+ public function remove()
+ {
+ $this->_dir->delete();
+ }
+
+ public static function addDir($p_path, $p_type)
+ {
+ $dir = new CcMusicDirs();
+ $dir->setType($p_type);
+ $dir->setDirectory($p_path);
+ $dir->save();
+
+ $mus_dir = new MusicDir();
+ $mus_dir->_dir = $dir;
+
+ return $mus_dir;
+ }
+
+ public static function addWatchedDir($p_path)
+ {
+ return self::addDir($p_path, "watched");
+ }
+
+ public static function getDirByPK($pk)
+ {
+ $dir = CcMusicDirQuery::create()->findPK($pk);
+
+ $mus_dir = new MusicDir();
+ $mus_dir->_dir = $dir;
+
+ return $mus_dir;
+ }
+
+ public static function getDirByPath($p_path)
+ {
+ $dir = CcMusicDirsQuery::create()
+ ->filterByDirectory($p_path)
+ ->findOne();
+
+ $mus_dir = new MusicDir();
+ $mus_dir->_dir = $dir;
+
+ return $mus_dir;
+ }
+
+ public static function getWatchedDirs()
+ {
+ $result = array();
+
+ $dirs = CcMusicDirsQuery::create()
+ ->filterByType("watched")
+ ->find();
+
+ foreach($dirs as $dir) {
+ $tmp = new MusicDir();
+ $tmp->_dir = $dir;
+
+ $result[] = $tmp;
+ }
+
+ return $result;
+ }
+
+ public static function getStorDir()
+ {
+ $dir = CcMusicDirsQuery::create()
+ ->filterByType("stor")
+ ->findOne();
+
+ $mus_dir = new MusicDir();
+ $mus_dir->_dir = $dir;
+
+ return $mus_dir;
+ }
+
+ public static function getWatchedDirFromFilepath($p_filepath)
+ {
+ $dirs = CcMusicDirsQuery::create()
+ ->find();
+
+ foreach($dirs as $dir) {
+ $directory = $dir->getDirectory();
+ if (substr($p_filepath, 0, strlen($directory)) === $directory) {
+ $mus_dir = new MusicDir();
+ $mus_dir->_dir = $dir;
+ return $mus_dir;
+ }
+ }
+
+ return null;
+ }
+
+ public static function splitFilePath($p_filepath)
+ {
+ $mus_dir = self::getWatchedDirFromFilepath($p_filepath);
+ if(is_null($mus_dir)) {
+ return null;
+ }
+
+ $length_dir = strlen($mus_dir->getDirectory());
+ $length_filepath = strlen($p_filepath);
+ $length = $length_filepath - $length_dir;
+
+ $fp = substr($p_filepath, $length_dir+1, $length);
+
+ return array($mus_dir->getDirectory(), $fp);
+ }
+
+}
diff --git a/airtime_mvc/application/models/Preference.php b/airtime_mvc/application/models/Preference.php
index 463ad99fd..1709d6887 100644
--- a/airtime_mvc/application/models/Preference.php
+++ b/airtime_mvc/application/models/Preference.php
@@ -188,14 +188,5 @@ class Application_Model_Preference
return $val;
}
}
-
- public static function SetWatchedDirectory($directory) {
- Application_Model_Preference::SetValue("watched_directory", $directory);
- }
-
- public static function GetWatchedDirectory() {
- return Application_Model_Preference::GetValue("watched_directory");
- }
-
}
diff --git a/airtime_mvc/application/models/StoredFile.php b/airtime_mvc/application/models/StoredFile.php
index aa7dbef92..04fe7655b 100644
--- a/airtime_mvc/application/models/StoredFile.php
+++ b/airtime_mvc/application/models/StoredFile.php
@@ -39,7 +39,6 @@ class StoredFile {
"bit_rate" => "DbBitRate",
"sample_rate" => "DbSampleRate",
"mime" => "DbMime",
- "filepath" => "DbFilepath",
"md5" => "DbMd5",
"ftype" => "DbFtype"
);
@@ -108,9 +107,11 @@ class StoredFile {
if($dbColumn == "track_title" && (is_null($mdValue) || $mdValue == "")) {
continue;
}
- $propelColumn = $this->_dbMD[$dbColumn];
- $method = "set$propelColumn";
- $this->_file->$method($mdValue);
+ if (isset($this->_dbMD[$dbColumn])) {
+ $propelColumn = $this->_dbMD[$dbColumn];
+ $method = "set$propelColumn";
+ $this->_file->$method($mdValue);
+ }
}
}
@@ -144,10 +145,12 @@ class StoredFile {
if($p_category == "track_title" && (is_null($p_value) || $p_value == "")) {
return;
}
- $propelColumn = $this->_dbMD[$p_category];
- $method = "set$propelColumn";
- $this->_file->$method($p_value);
- $this->_file->save();
+ if (isset($this->_dbMD[$dbColumn])) {
+ $propelColumn = $this->_dbMD[$p_category];
+ $method = "set$propelColumn";
+ $this->_file->$method($p_value);
+ $this->_file->save();
+ }
}
/**
@@ -398,7 +401,28 @@ class StoredFile {
*/
public function getFilePath()
{
- return $this->_file->getDbFilepath();
+ $music_dir = MusicDir::getDirByPK($this->_file->getDbDirectory());
+ $filepath = $this->_file->getDbFilepath();
+
+ return $music_dir->getDirectory()."/".$filepath;
+ }
+
+ /**
+ * Set real filename of raw media data
+ *
+ * @return string
+ */
+ public function setFilePath($p_filepath)
+ {
+ $path_info = MusicDir::splitFilePath($p_filepath);
+ if (is_null($path_info)) {
+ return -1;
+ }
+ $musicDir = MusicDir::getDirByPath($path_info[0]);
+
+ $this->_file->setDbDirectory($musicDir->getId());
+ $this->_file->setDbFilepath($path_info[1]);
+ $this->_file->save();
}
/**
@@ -414,11 +438,20 @@ class StoredFile {
{
$file = new CcFiles();
$file->setDbGunid(md5(uniqid("", true)));
- $file->save();
$storedFile = new StoredFile();
$storedFile->_file = $file;
+ if(isset($md['MDATA_KEY_FILEPATH'])) {
+ $res = $storedFile->setFilePath($md['MDATA_KEY_FILEPATH']);
+ if ($res === -1) {
+ return null;
+ }
+ }
+ else {
+ return null;
+ }
+
if(isset($md)) {
$storedFile->setMetadata($md);
}
@@ -456,8 +489,15 @@ class StoredFile {
->findOne();
}
else if (isset($p_filepath)) {
+ $path_info = MusicDir::splitFilePath($p_filepath);
+ if (is_null($path_info)) {
+ return null;
+ }
+ $musicDir = MusicDir::getDirByPath($path_info[0]);
+
$file = CcFilesQuery::create()
- ->filterByDbFilepath($p_filepath)
+ ->filterByDbDirectory($music_dir->getId())
+ ->filterByDbFilepath($path_info[1])
->findOne();
}
else {
@@ -755,8 +795,9 @@ class StoredFile {
}
else {
- global $CC_CONFIG;
- $stor = $CC_CONFIG["storageDir"];
+ $storDir = MusicDir::getStorDir();
+ $stor = $storDir->getDirectory();
+
$audio_stor = $stor . DIRECTORY_SEPARATOR . $fileName;
$md = array();
@@ -765,7 +806,6 @@ class StoredFile {
$md['MDATA_KEY_TITLE'] = $fileName;
StoredFile::Insert($md);
- $r = @chmod($audio_file, 0666);
$r = @rename($audio_file, $audio_stor);
}
diff --git a/airtime_mvc/application/models/airtime/CcFiles.php b/airtime_mvc/application/models/airtime/CcFiles.php
index edc51a659..f1479409a 100644
--- a/airtime_mvc/application/models/airtime/CcFiles.php
+++ b/airtime_mvc/application/models/airtime/CcFiles.php
@@ -1,6 +1,6 @@
length;
- }
-
- public function setDbLength($time)
- {
- $this->length = $time;
- //$this->modifiedColumns[] = CcPlaylistcontentsPeer::LENGTH;
- return Common::setTimeInSub($this, 'LENGTH', $time);
- }
-
-
} // CcFiles
diff --git a/airtime_mvc/application/models/airtime/CcMusicDirs.php b/airtime_mvc/application/models/airtime/CcMusicDirs.php
new file mode 100644
index 000000000..d6929bcda
--- /dev/null
+++ b/airtime_mvc/application/models/airtime/CcMusicDirs.php
@@ -0,0 +1,18 @@
+prepare($sql);
- $stmt->bindValue(':p1', $this->getDbId());
- $stmt->execute();
- return $stmt->fetchColumn();
- }
-
- public function computeLength()
- {
- $con = Propel::getConnection(CcPlaylistPeer::DATABASE_NAME);
-
- $sql = 'SELECT SUM('.CcPlaylistcontentsPeer::CLIPLENGTH.') AS length'
- . ' FROM ' .CcPlaylistcontentsPeer::TABLE_NAME
- . ' WHERE ' .CcPlaylistcontentsPeer::PLAYLIST_ID. ' = :p1';
-
- $stmt = $con->prepare($sql);
- $stmt->bindValue(':p1', $this->getDbId());
- $stmt->execute();
- return $stmt->fetchColumn();
- }
-
-
} // CcPlaylist
diff --git a/airtime_mvc/application/models/airtime/CcPlaylistcontents.php b/airtime_mvc/application/models/airtime/CcPlaylistcontents.php
index 1b6417a66..3a7ee2691 100644
--- a/airtime_mvc/application/models/airtime/CcPlaylistcontents.php
+++ b/airtime_mvc/application/models/airtime/CcPlaylistcontents.php
@@ -1,6 +1,6 @@
fadein;
- }
-
- public function setDbFadein($time)
- {
- $this->fadein = $time;
- //$this->modifiedColumns[] = CcPlaylistcontentsPeer::FADEIN;
- Common::setTimeInSub($this, 'FADEIN', $time);
- }
-
- public function getDbFadeout()
- {
- return $this->fadeout;
- }
-
- public function setDbFadeout($time)
- {
- $this->fadeout = $time;
- //$this->modifiedColumns[] = CcPlaylistcontentsPeer::FADEOUT;
- Common::setTimeInSub($this, 'FADEOUT', $time);
- }
-
- public function getDbCuein()
- {
- return $this->cuein;
- }
-
- public function setDbCuein($time)
- {
- $this->cuein = $time;
- //$this->modifiedColumns[] = CcPlaylistcontentsPeer::CUEIN;
- Common::setTimeInSub($this, 'CUEIN', $time);
- }
-
- public function getDbCueout()
- {
- return $this->cueout;
- }
-
- public function setDbCueout($time)
- {
- $this->cueout = $time;
- //$this->modifiedColumns[] = CcPlaylistcontentsPeer::CUEOUT;
- Common::setTimeInSub($this, 'CUEOUT', $time);
- }
-
- public function getDbCliplength()
- {
- return $this->cliplength;
- }
-
- public function setDbCliplength($time)
- {
- $this->cliplength = $time;
- //$this->modifiedColumns[] = CcPlaylistcontentsPeer::CLIPLENGTH;
- Common::setTimeInSub($this, 'CLIPLENGTH', $time);
- }
-
-
-
-
} // CcPlaylistcontents
diff --git a/airtime_mvc/application/models/airtime/map/CcFilesTableMap.php b/airtime_mvc/application/models/airtime/map/CcFilesTableMap.php
index c477a934a..07f981dd0 100644
--- a/airtime_mvc/application/models/airtime/map/CcFilesTableMap.php
+++ b/airtime_mvc/application/models/airtime/map/CcFilesTableMap.php
@@ -43,6 +43,7 @@ class CcFilesTableMap extends TableMap {
$this->addColumn('NAME', 'DbName', 'VARCHAR', true, 255, '');
$this->addColumn('MIME', 'DbMime', 'VARCHAR', true, 255, '');
$this->addColumn('FTYPE', 'DbFtype', 'VARCHAR', true, 128, '');
+ $this->addForeignKey('DIRECTORY', 'DbDirectory', 'INTEGER', 'cc_music_dirs', 'ID', false, null, null);
$this->addColumn('FILEPATH', 'DbFilepath', 'LONGVARCHAR', false, null, '');
$this->addColumn('STATE', 'DbState', 'VARCHAR', true, 128, 'empty');
$this->addColumn('CURRENTLYACCESSING', 'DbCurrentlyaccessing', 'INTEGER', true, null, 0);
@@ -101,6 +102,7 @@ class CcFilesTableMap extends TableMap {
public function buildRelations()
{
$this->addRelation('CcSubjs', 'CcSubjs', RelationMap::MANY_TO_ONE, array('editedby' => 'id', ), null, null);
+ $this->addRelation('CcMusicDirs', 'CcMusicDirs', RelationMap::MANY_TO_ONE, array('directory' => 'id', ), null, null);
$this->addRelation('CcShowInstances', 'CcShowInstances', RelationMap::ONE_TO_MANY, array('id' => 'file_id', ), 'CASCADE', null);
$this->addRelation('CcPlaylistcontents', 'CcPlaylistcontents', RelationMap::ONE_TO_MANY, array('id' => 'file_id', ), 'CASCADE', null);
} // buildRelations()
diff --git a/airtime_mvc/application/models/airtime/map/CcMusicDirsTableMap.php b/airtime_mvc/application/models/airtime/map/CcMusicDirsTableMap.php
new file mode 100644
index 000000000..def5aeb6d
--- /dev/null
+++ b/airtime_mvc/application/models/airtime/map/CcMusicDirsTableMap.php
@@ -0,0 +1,55 @@
+setName('cc_music_dirs');
+ $this->setPhpName('CcMusicDirs');
+ $this->setClassname('CcMusicDirs');
+ $this->setPackage('airtime');
+ $this->setUseIdGenerator(true);
+ $this->setPrimaryKeyMethodInfo('cc_music_dirs_id_seq');
+ // columns
+ $this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
+ $this->addColumn('DIRECTORY', 'Directory', 'LONGVARCHAR', false, null, null);
+ $this->addColumn('TYPE', 'Type', 'VARCHAR', false, 255, null);
+ // validators
+ } // initialize()
+
+ /**
+ * Build the RelationMap objects for this table relationships
+ */
+ public function buildRelations()
+ {
+ $this->addRelation('CcFiles', 'CcFiles', RelationMap::ONE_TO_MANY, array('id' => 'directory', ), null, null);
+ } // buildRelations()
+
+} // CcMusicDirsTableMap
diff --git a/airtime_mvc/application/models/airtime/om/BaseCcFiles.php b/airtime_mvc/application/models/airtime/om/BaseCcFiles.php
index 024913755..ca1742baa 100644
--- a/airtime_mvc/application/models/airtime/om/BaseCcFiles.php
+++ b/airtime_mvc/application/models/airtime/om/BaseCcFiles.php
@@ -57,6 +57,12 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
*/
protected $ftype;
+ /**
+ * The value for the directory field.
+ * @var int
+ */
+ protected $directory;
+
/**
* The value for the filepath field.
* Note: this column has a database default value of: ''
@@ -359,6 +365,11 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
*/
protected $aCcSubjs;
+ /**
+ * @var CcMusicDirs
+ */
+ protected $aCcMusicDirs;
+
/**
* @var array CcShowInstances[] Collection to store aggregation of CcShowInstances objects.
*/
@@ -459,6 +470,16 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
return $this->ftype;
}
+ /**
+ * Get the [directory] column value.
+ *
+ * @return int
+ */
+ public function getDbDirectory()
+ {
+ return $this->directory;
+ }
+
/**
* Get the [filepath] column value.
*
@@ -1095,6 +1116,30 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
return $this;
} // setDbFtype()
+ /**
+ * Set the value of [directory] column.
+ *
+ * @param int $v new value
+ * @return CcFiles The current object (for fluent API support)
+ */
+ public function setDbDirectory($v)
+ {
+ if ($v !== null) {
+ $v = (int) $v;
+ }
+
+ if ($this->directory !== $v) {
+ $this->directory = $v;
+ $this->modifiedColumns[] = CcFilesPeer::DIRECTORY;
+ }
+
+ if ($this->aCcMusicDirs !== null && $this->aCcMusicDirs->getId() !== $v) {
+ $this->aCcMusicDirs = null;
+ }
+
+ return $this;
+ } // setDbDirectory()
+
/**
* Set the value of [filepath] column.
*
@@ -2198,55 +2243,56 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
$this->name = ($row[$startcol + 2] !== null) ? (string) $row[$startcol + 2] : null;
$this->mime = ($row[$startcol + 3] !== null) ? (string) $row[$startcol + 3] : null;
$this->ftype = ($row[$startcol + 4] !== null) ? (string) $row[$startcol + 4] : null;
- $this->filepath = ($row[$startcol + 5] !== null) ? (string) $row[$startcol + 5] : null;
- $this->state = ($row[$startcol + 6] !== null) ? (string) $row[$startcol + 6] : null;
- $this->currentlyaccessing = ($row[$startcol + 7] !== null) ? (int) $row[$startcol + 7] : null;
- $this->editedby = ($row[$startcol + 8] !== null) ? (int) $row[$startcol + 8] : null;
- $this->mtime = ($row[$startcol + 9] !== null) ? (string) $row[$startcol + 9] : null;
- $this->md5 = ($row[$startcol + 10] !== null) ? (string) $row[$startcol + 10] : null;
- $this->track_title = ($row[$startcol + 11] !== null) ? (string) $row[$startcol + 11] : null;
- $this->artist_name = ($row[$startcol + 12] !== null) ? (string) $row[$startcol + 12] : null;
- $this->bit_rate = ($row[$startcol + 13] !== null) ? (string) $row[$startcol + 13] : null;
- $this->sample_rate = ($row[$startcol + 14] !== null) ? (string) $row[$startcol + 14] : null;
- $this->format = ($row[$startcol + 15] !== null) ? (string) $row[$startcol + 15] : null;
- $this->length = ($row[$startcol + 16] !== null) ? (string) $row[$startcol + 16] : null;
- $this->album_title = ($row[$startcol + 17] !== null) ? (string) $row[$startcol + 17] : null;
- $this->genre = ($row[$startcol + 18] !== null) ? (string) $row[$startcol + 18] : null;
- $this->comments = ($row[$startcol + 19] !== null) ? (string) $row[$startcol + 19] : null;
- $this->year = ($row[$startcol + 20] !== null) ? (string) $row[$startcol + 20] : null;
- $this->track_number = ($row[$startcol + 21] !== null) ? (int) $row[$startcol + 21] : null;
- $this->channels = ($row[$startcol + 22] !== null) ? (int) $row[$startcol + 22] : null;
- $this->url = ($row[$startcol + 23] !== null) ? (string) $row[$startcol + 23] : null;
- $this->bpm = ($row[$startcol + 24] !== null) ? (string) $row[$startcol + 24] : null;
- $this->rating = ($row[$startcol + 25] !== null) ? (string) $row[$startcol + 25] : null;
- $this->encoded_by = ($row[$startcol + 26] !== null) ? (string) $row[$startcol + 26] : null;
- $this->disc_number = ($row[$startcol + 27] !== null) ? (string) $row[$startcol + 27] : null;
- $this->mood = ($row[$startcol + 28] !== null) ? (string) $row[$startcol + 28] : null;
- $this->label = ($row[$startcol + 29] !== null) ? (string) $row[$startcol + 29] : null;
- $this->composer = ($row[$startcol + 30] !== null) ? (string) $row[$startcol + 30] : null;
- $this->encoder = ($row[$startcol + 31] !== null) ? (string) $row[$startcol + 31] : null;
- $this->checksum = ($row[$startcol + 32] !== null) ? (string) $row[$startcol + 32] : null;
- $this->lyrics = ($row[$startcol + 33] !== null) ? (string) $row[$startcol + 33] : null;
- $this->orchestra = ($row[$startcol + 34] !== null) ? (string) $row[$startcol + 34] : null;
- $this->conductor = ($row[$startcol + 35] !== null) ? (string) $row[$startcol + 35] : null;
- $this->lyricist = ($row[$startcol + 36] !== null) ? (string) $row[$startcol + 36] : null;
- $this->original_lyricist = ($row[$startcol + 37] !== null) ? (string) $row[$startcol + 37] : null;
- $this->radio_station_name = ($row[$startcol + 38] !== null) ? (string) $row[$startcol + 38] : null;
- $this->info_url = ($row[$startcol + 39] !== null) ? (string) $row[$startcol + 39] : null;
- $this->artist_url = ($row[$startcol + 40] !== null) ? (string) $row[$startcol + 40] : null;
- $this->audio_source_url = ($row[$startcol + 41] !== null) ? (string) $row[$startcol + 41] : null;
- $this->radio_station_url = ($row[$startcol + 42] !== null) ? (string) $row[$startcol + 42] : null;
- $this->buy_this_url = ($row[$startcol + 43] !== null) ? (string) $row[$startcol + 43] : null;
- $this->isrc_number = ($row[$startcol + 44] !== null) ? (string) $row[$startcol + 44] : null;
- $this->catalog_number = ($row[$startcol + 45] !== null) ? (string) $row[$startcol + 45] : null;
- $this->original_artist = ($row[$startcol + 46] !== null) ? (string) $row[$startcol + 46] : null;
- $this->copyright = ($row[$startcol + 47] !== null) ? (string) $row[$startcol + 47] : null;
- $this->report_datetime = ($row[$startcol + 48] !== null) ? (string) $row[$startcol + 48] : null;
- $this->report_location = ($row[$startcol + 49] !== null) ? (string) $row[$startcol + 49] : null;
- $this->report_organization = ($row[$startcol + 50] !== null) ? (string) $row[$startcol + 50] : null;
- $this->subject = ($row[$startcol + 51] !== null) ? (string) $row[$startcol + 51] : null;
- $this->contributor = ($row[$startcol + 52] !== null) ? (string) $row[$startcol + 52] : null;
- $this->language = ($row[$startcol + 53] !== null) ? (string) $row[$startcol + 53] : null;
+ $this->directory = ($row[$startcol + 5] !== null) ? (int) $row[$startcol + 5] : null;
+ $this->filepath = ($row[$startcol + 6] !== null) ? (string) $row[$startcol + 6] : null;
+ $this->state = ($row[$startcol + 7] !== null) ? (string) $row[$startcol + 7] : null;
+ $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->resetModified();
$this->setNew(false);
@@ -2255,7 +2301,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
$this->ensureConsistency();
}
- return $startcol + 54; // 54 = CcFilesPeer::NUM_COLUMNS - CcFilesPeer::NUM_LAZY_LOAD_COLUMNS).
+ return $startcol + 55; // 55 = CcFilesPeer::NUM_COLUMNS - CcFilesPeer::NUM_LAZY_LOAD_COLUMNS).
} catch (Exception $e) {
throw new PropelException("Error populating CcFiles object", $e);
@@ -2278,6 +2324,9 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
public function ensureConsistency()
{
+ if ($this->aCcMusicDirs !== null && $this->directory !== $this->aCcMusicDirs->getId()) {
+ $this->aCcMusicDirs = null;
+ }
if ($this->aCcSubjs !== null && $this->editedby !== $this->aCcSubjs->getDbId()) {
$this->aCcSubjs = null;
}
@@ -2321,6 +2370,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
if ($deep) { // also de-associate any related objects?
$this->aCcSubjs = null;
+ $this->aCcMusicDirs = null;
$this->collCcShowInstancess = null;
$this->collCcPlaylistcontentss = null;
@@ -2447,6 +2497,13 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
$this->setCcSubjs($this->aCcSubjs);
}
+ if ($this->aCcMusicDirs !== null) {
+ if ($this->aCcMusicDirs->isModified() || $this->aCcMusicDirs->isNew()) {
+ $affectedRows += $this->aCcMusicDirs->save($con);
+ }
+ $this->setCcMusicDirs($this->aCcMusicDirs);
+ }
+
if ($this->isNew() ) {
$this->modifiedColumns[] = CcFilesPeer::ID;
}
@@ -2563,6 +2620,12 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
}
}
+ if ($this->aCcMusicDirs !== null) {
+ if (!$this->aCcMusicDirs->validate($columns)) {
+ $failureMap = array_merge($failureMap, $this->aCcMusicDirs->getValidationFailures());
+ }
+ }
+
if (($retval = CcFilesPeer::doValidate($this, $columns)) !== true) {
$failureMap = array_merge($failureMap, $retval);
@@ -2634,150 +2697,153 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
return $this->getDbFtype();
break;
case 5:
- return $this->getDbFilepath();
+ return $this->getDbDirectory();
break;
case 6:
- return $this->getDbState();
+ return $this->getDbFilepath();
break;
case 7:
- return $this->getDbCurrentlyaccessing();
+ return $this->getDbState();
break;
case 8:
- return $this->getDbEditedby();
+ return $this->getDbCurrentlyaccessing();
break;
case 9:
- return $this->getDbMtime();
+ return $this->getDbEditedby();
break;
case 10:
- return $this->getDbMd5();
+ return $this->getDbMtime();
break;
case 11:
- return $this->getDbTrackTitle();
+ return $this->getDbMd5();
break;
case 12:
- return $this->getDbArtistName();
+ return $this->getDbTrackTitle();
break;
case 13:
- return $this->getDbBitRate();
+ return $this->getDbArtistName();
break;
case 14:
- return $this->getDbSampleRate();
+ return $this->getDbBitRate();
break;
case 15:
- return $this->getDbFormat();
+ return $this->getDbSampleRate();
break;
case 16:
- return $this->getDbLength();
+ return $this->getDbFormat();
break;
case 17:
- return $this->getDbAlbumTitle();
+ return $this->getDbLength();
break;
case 18:
- return $this->getDbGenre();
+ return $this->getDbAlbumTitle();
break;
case 19:
- return $this->getDbComments();
+ return $this->getDbGenre();
break;
case 20:
- return $this->getDbYear();
+ return $this->getDbComments();
break;
case 21:
- return $this->getDbTrackNumber();
+ return $this->getDbYear();
break;
case 22:
- return $this->getDbChannels();
+ return $this->getDbTrackNumber();
break;
case 23:
- return $this->getDbUrl();
+ return $this->getDbChannels();
break;
case 24:
- return $this->getDbBpm();
+ return $this->getDbUrl();
break;
case 25:
- return $this->getDbRating();
+ return $this->getDbBpm();
break;
case 26:
- return $this->getDbEncodedBy();
+ return $this->getDbRating();
break;
case 27:
- return $this->getDbDiscNumber();
+ return $this->getDbEncodedBy();
break;
case 28:
- return $this->getDbMood();
+ return $this->getDbDiscNumber();
break;
case 29:
- return $this->getDbLabel();
+ return $this->getDbMood();
break;
case 30:
- return $this->getDbComposer();
+ return $this->getDbLabel();
break;
case 31:
- return $this->getDbEncoder();
+ return $this->getDbComposer();
break;
case 32:
- return $this->getDbChecksum();
+ return $this->getDbEncoder();
break;
case 33:
- return $this->getDbLyrics();
+ return $this->getDbChecksum();
break;
case 34:
- return $this->getDbOrchestra();
+ return $this->getDbLyrics();
break;
case 35:
- return $this->getDbConductor();
+ return $this->getDbOrchestra();
break;
case 36:
- return $this->getDbLyricist();
+ return $this->getDbConductor();
break;
case 37:
- return $this->getDbOriginalLyricist();
+ return $this->getDbLyricist();
break;
case 38:
- return $this->getDbRadioStationName();
+ return $this->getDbOriginalLyricist();
break;
case 39:
- return $this->getDbInfoUrl();
+ return $this->getDbRadioStationName();
break;
case 40:
- return $this->getDbArtistUrl();
+ return $this->getDbInfoUrl();
break;
case 41:
- return $this->getDbAudioSourceUrl();
+ return $this->getDbArtistUrl();
break;
case 42:
- return $this->getDbRadioStationUrl();
+ return $this->getDbAudioSourceUrl();
break;
case 43:
- return $this->getDbBuyThisUrl();
+ return $this->getDbRadioStationUrl();
break;
case 44:
- return $this->getDbIsrcNumber();
+ return $this->getDbBuyThisUrl();
break;
case 45:
- return $this->getDbCatalogNumber();
+ return $this->getDbIsrcNumber();
break;
case 46:
- return $this->getDbOriginalArtist();
+ return $this->getDbCatalogNumber();
break;
case 47:
- return $this->getDbCopyright();
+ return $this->getDbOriginalArtist();
break;
case 48:
- return $this->getDbReportDatetime();
+ return $this->getDbCopyright();
break;
case 49:
- return $this->getDbReportLocation();
+ return $this->getDbReportDatetime();
break;
case 50:
- return $this->getDbReportOrganization();
+ return $this->getDbReportLocation();
break;
case 51:
- return $this->getDbSubject();
+ return $this->getDbReportOrganization();
break;
case 52:
- return $this->getDbContributor();
+ return $this->getDbSubject();
break;
case 53:
+ return $this->getDbContributor();
+ break;
+ case 54:
return $this->getDbLanguage();
break;
default:
@@ -2809,60 +2875,64 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
$keys[2] => $this->getDbName(),
$keys[3] => $this->getDbMime(),
$keys[4] => $this->getDbFtype(),
- $keys[5] => $this->getDbFilepath(),
- $keys[6] => $this->getDbState(),
- $keys[7] => $this->getDbCurrentlyaccessing(),
- $keys[8] => $this->getDbEditedby(),
- $keys[9] => $this->getDbMtime(),
- $keys[10] => $this->getDbMd5(),
- $keys[11] => $this->getDbTrackTitle(),
- $keys[12] => $this->getDbArtistName(),
- $keys[13] => $this->getDbBitRate(),
- $keys[14] => $this->getDbSampleRate(),
- $keys[15] => $this->getDbFormat(),
- $keys[16] => $this->getDbLength(),
- $keys[17] => $this->getDbAlbumTitle(),
- $keys[18] => $this->getDbGenre(),
- $keys[19] => $this->getDbComments(),
- $keys[20] => $this->getDbYear(),
- $keys[21] => $this->getDbTrackNumber(),
- $keys[22] => $this->getDbChannels(),
- $keys[23] => $this->getDbUrl(),
- $keys[24] => $this->getDbBpm(),
- $keys[25] => $this->getDbRating(),
- $keys[26] => $this->getDbEncodedBy(),
- $keys[27] => $this->getDbDiscNumber(),
- $keys[28] => $this->getDbMood(),
- $keys[29] => $this->getDbLabel(),
- $keys[30] => $this->getDbComposer(),
- $keys[31] => $this->getDbEncoder(),
- $keys[32] => $this->getDbChecksum(),
- $keys[33] => $this->getDbLyrics(),
- $keys[34] => $this->getDbOrchestra(),
- $keys[35] => $this->getDbConductor(),
- $keys[36] => $this->getDbLyricist(),
- $keys[37] => $this->getDbOriginalLyricist(),
- $keys[38] => $this->getDbRadioStationName(),
- $keys[39] => $this->getDbInfoUrl(),
- $keys[40] => $this->getDbArtistUrl(),
- $keys[41] => $this->getDbAudioSourceUrl(),
- $keys[42] => $this->getDbRadioStationUrl(),
- $keys[43] => $this->getDbBuyThisUrl(),
- $keys[44] => $this->getDbIsrcNumber(),
- $keys[45] => $this->getDbCatalogNumber(),
- $keys[46] => $this->getDbOriginalArtist(),
- $keys[47] => $this->getDbCopyright(),
- $keys[48] => $this->getDbReportDatetime(),
- $keys[49] => $this->getDbReportLocation(),
- $keys[50] => $this->getDbReportOrganization(),
- $keys[51] => $this->getDbSubject(),
- $keys[52] => $this->getDbContributor(),
- $keys[53] => $this->getDbLanguage(),
+ $keys[5] => $this->getDbDirectory(),
+ $keys[6] => $this->getDbFilepath(),
+ $keys[7] => $this->getDbState(),
+ $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(),
);
if ($includeForeignObjects) {
if (null !== $this->aCcSubjs) {
$result['CcSubjs'] = $this->aCcSubjs->toArray($keyType, $includeLazyLoadColumns, true);
}
+ if (null !== $this->aCcMusicDirs) {
+ $result['CcMusicDirs'] = $this->aCcMusicDirs->toArray($keyType, $includeLazyLoadColumns, true);
+ }
}
return $result;
}
@@ -2910,150 +2980,153 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
$this->setDbFtype($value);
break;
case 5:
- $this->setDbFilepath($value);
+ $this->setDbDirectory($value);
break;
case 6:
- $this->setDbState($value);
+ $this->setDbFilepath($value);
break;
case 7:
- $this->setDbCurrentlyaccessing($value);
+ $this->setDbState($value);
break;
case 8:
- $this->setDbEditedby($value);
+ $this->setDbCurrentlyaccessing($value);
break;
case 9:
- $this->setDbMtime($value);
+ $this->setDbEditedby($value);
break;
case 10:
- $this->setDbMd5($value);
+ $this->setDbMtime($value);
break;
case 11:
- $this->setDbTrackTitle($value);
+ $this->setDbMd5($value);
break;
case 12:
- $this->setDbArtistName($value);
+ $this->setDbTrackTitle($value);
break;
case 13:
- $this->setDbBitRate($value);
+ $this->setDbArtistName($value);
break;
case 14:
- $this->setDbSampleRate($value);
+ $this->setDbBitRate($value);
break;
case 15:
- $this->setDbFormat($value);
+ $this->setDbSampleRate($value);
break;
case 16:
- $this->setDbLength($value);
+ $this->setDbFormat($value);
break;
case 17:
- $this->setDbAlbumTitle($value);
+ $this->setDbLength($value);
break;
case 18:
- $this->setDbGenre($value);
+ $this->setDbAlbumTitle($value);
break;
case 19:
- $this->setDbComments($value);
+ $this->setDbGenre($value);
break;
case 20:
- $this->setDbYear($value);
+ $this->setDbComments($value);
break;
case 21:
- $this->setDbTrackNumber($value);
+ $this->setDbYear($value);
break;
case 22:
- $this->setDbChannels($value);
+ $this->setDbTrackNumber($value);
break;
case 23:
- $this->setDbUrl($value);
+ $this->setDbChannels($value);
break;
case 24:
- $this->setDbBpm($value);
+ $this->setDbUrl($value);
break;
case 25:
- $this->setDbRating($value);
+ $this->setDbBpm($value);
break;
case 26:
- $this->setDbEncodedBy($value);
+ $this->setDbRating($value);
break;
case 27:
- $this->setDbDiscNumber($value);
+ $this->setDbEncodedBy($value);
break;
case 28:
- $this->setDbMood($value);
+ $this->setDbDiscNumber($value);
break;
case 29:
- $this->setDbLabel($value);
+ $this->setDbMood($value);
break;
case 30:
- $this->setDbComposer($value);
+ $this->setDbLabel($value);
break;
case 31:
- $this->setDbEncoder($value);
+ $this->setDbComposer($value);
break;
case 32:
- $this->setDbChecksum($value);
+ $this->setDbEncoder($value);
break;
case 33:
- $this->setDbLyrics($value);
+ $this->setDbChecksum($value);
break;
case 34:
- $this->setDbOrchestra($value);
+ $this->setDbLyrics($value);
break;
case 35:
- $this->setDbConductor($value);
+ $this->setDbOrchestra($value);
break;
case 36:
- $this->setDbLyricist($value);
+ $this->setDbConductor($value);
break;
case 37:
- $this->setDbOriginalLyricist($value);
+ $this->setDbLyricist($value);
break;
case 38:
- $this->setDbRadioStationName($value);
+ $this->setDbOriginalLyricist($value);
break;
case 39:
- $this->setDbInfoUrl($value);
+ $this->setDbRadioStationName($value);
break;
case 40:
- $this->setDbArtistUrl($value);
+ $this->setDbInfoUrl($value);
break;
case 41:
- $this->setDbAudioSourceUrl($value);
+ $this->setDbArtistUrl($value);
break;
case 42:
- $this->setDbRadioStationUrl($value);
+ $this->setDbAudioSourceUrl($value);
break;
case 43:
- $this->setDbBuyThisUrl($value);
+ $this->setDbRadioStationUrl($value);
break;
case 44:
- $this->setDbIsrcNumber($value);
+ $this->setDbBuyThisUrl($value);
break;
case 45:
- $this->setDbCatalogNumber($value);
+ $this->setDbIsrcNumber($value);
break;
case 46:
- $this->setDbOriginalArtist($value);
+ $this->setDbCatalogNumber($value);
break;
case 47:
- $this->setDbCopyright($value);
+ $this->setDbOriginalArtist($value);
break;
case 48:
- $this->setDbReportDatetime($value);
+ $this->setDbCopyright($value);
break;
case 49:
- $this->setDbReportLocation($value);
+ $this->setDbReportDatetime($value);
break;
case 50:
- $this->setDbReportOrganization($value);
+ $this->setDbReportLocation($value);
break;
case 51:
- $this->setDbSubject($value);
+ $this->setDbReportOrganization($value);
break;
case 52:
- $this->setDbContributor($value);
+ $this->setDbSubject($value);
break;
case 53:
+ $this->setDbContributor($value);
+ break;
+ case 54:
$this->setDbLanguage($value);
break;
} // switch()
@@ -3085,55 +3158,56 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
if (array_key_exists($keys[2], $arr)) $this->setDbName($arr[$keys[2]]);
if (array_key_exists($keys[3], $arr)) $this->setDbMime($arr[$keys[3]]);
if (array_key_exists($keys[4], $arr)) $this->setDbFtype($arr[$keys[4]]);
- if (array_key_exists($keys[5], $arr)) $this->setDbFilepath($arr[$keys[5]]);
- if (array_key_exists($keys[6], $arr)) $this->setDbState($arr[$keys[6]]);
- if (array_key_exists($keys[7], $arr)) $this->setDbCurrentlyaccessing($arr[$keys[7]]);
- if (array_key_exists($keys[8], $arr)) $this->setDbEditedby($arr[$keys[8]]);
- if (array_key_exists($keys[9], $arr)) $this->setDbMtime($arr[$keys[9]]);
- if (array_key_exists($keys[10], $arr)) $this->setDbMd5($arr[$keys[10]]);
- if (array_key_exists($keys[11], $arr)) $this->setDbTrackTitle($arr[$keys[11]]);
- if (array_key_exists($keys[12], $arr)) $this->setDbArtistName($arr[$keys[12]]);
- if (array_key_exists($keys[13], $arr)) $this->setDbBitRate($arr[$keys[13]]);
- if (array_key_exists($keys[14], $arr)) $this->setDbSampleRate($arr[$keys[14]]);
- if (array_key_exists($keys[15], $arr)) $this->setDbFormat($arr[$keys[15]]);
- if (array_key_exists($keys[16], $arr)) $this->setDbLength($arr[$keys[16]]);
- if (array_key_exists($keys[17], $arr)) $this->setDbAlbumTitle($arr[$keys[17]]);
- if (array_key_exists($keys[18], $arr)) $this->setDbGenre($arr[$keys[18]]);
- if (array_key_exists($keys[19], $arr)) $this->setDbComments($arr[$keys[19]]);
- if (array_key_exists($keys[20], $arr)) $this->setDbYear($arr[$keys[20]]);
- if (array_key_exists($keys[21], $arr)) $this->setDbTrackNumber($arr[$keys[21]]);
- if (array_key_exists($keys[22], $arr)) $this->setDbChannels($arr[$keys[22]]);
- if (array_key_exists($keys[23], $arr)) $this->setDbUrl($arr[$keys[23]]);
- if (array_key_exists($keys[24], $arr)) $this->setDbBpm($arr[$keys[24]]);
- if (array_key_exists($keys[25], $arr)) $this->setDbRating($arr[$keys[25]]);
- if (array_key_exists($keys[26], $arr)) $this->setDbEncodedBy($arr[$keys[26]]);
- if (array_key_exists($keys[27], $arr)) $this->setDbDiscNumber($arr[$keys[27]]);
- if (array_key_exists($keys[28], $arr)) $this->setDbMood($arr[$keys[28]]);
- if (array_key_exists($keys[29], $arr)) $this->setDbLabel($arr[$keys[29]]);
- if (array_key_exists($keys[30], $arr)) $this->setDbComposer($arr[$keys[30]]);
- if (array_key_exists($keys[31], $arr)) $this->setDbEncoder($arr[$keys[31]]);
- if (array_key_exists($keys[32], $arr)) $this->setDbChecksum($arr[$keys[32]]);
- if (array_key_exists($keys[33], $arr)) $this->setDbLyrics($arr[$keys[33]]);
- if (array_key_exists($keys[34], $arr)) $this->setDbOrchestra($arr[$keys[34]]);
- if (array_key_exists($keys[35], $arr)) $this->setDbConductor($arr[$keys[35]]);
- if (array_key_exists($keys[36], $arr)) $this->setDbLyricist($arr[$keys[36]]);
- if (array_key_exists($keys[37], $arr)) $this->setDbOriginalLyricist($arr[$keys[37]]);
- if (array_key_exists($keys[38], $arr)) $this->setDbRadioStationName($arr[$keys[38]]);
- if (array_key_exists($keys[39], $arr)) $this->setDbInfoUrl($arr[$keys[39]]);
- if (array_key_exists($keys[40], $arr)) $this->setDbArtistUrl($arr[$keys[40]]);
- if (array_key_exists($keys[41], $arr)) $this->setDbAudioSourceUrl($arr[$keys[41]]);
- if (array_key_exists($keys[42], $arr)) $this->setDbRadioStationUrl($arr[$keys[42]]);
- if (array_key_exists($keys[43], $arr)) $this->setDbBuyThisUrl($arr[$keys[43]]);
- if (array_key_exists($keys[44], $arr)) $this->setDbIsrcNumber($arr[$keys[44]]);
- if (array_key_exists($keys[45], $arr)) $this->setDbCatalogNumber($arr[$keys[45]]);
- if (array_key_exists($keys[46], $arr)) $this->setDbOriginalArtist($arr[$keys[46]]);
- if (array_key_exists($keys[47], $arr)) $this->setDbCopyright($arr[$keys[47]]);
- if (array_key_exists($keys[48], $arr)) $this->setDbReportDatetime($arr[$keys[48]]);
- if (array_key_exists($keys[49], $arr)) $this->setDbReportLocation($arr[$keys[49]]);
- if (array_key_exists($keys[50], $arr)) $this->setDbReportOrganization($arr[$keys[50]]);
- if (array_key_exists($keys[51], $arr)) $this->setDbSubject($arr[$keys[51]]);
- if (array_key_exists($keys[52], $arr)) $this->setDbContributor($arr[$keys[52]]);
- if (array_key_exists($keys[53], $arr)) $this->setDbLanguage($arr[$keys[53]]);
+ if (array_key_exists($keys[5], $arr)) $this->setDbDirectory($arr[$keys[5]]);
+ if (array_key_exists($keys[6], $arr)) $this->setDbFilepath($arr[$keys[6]]);
+ if (array_key_exists($keys[7], $arr)) $this->setDbState($arr[$keys[7]]);
+ 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]]);
}
/**
@@ -3150,6 +3224,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
if ($this->isColumnModified(CcFilesPeer::NAME)) $criteria->add(CcFilesPeer::NAME, $this->name);
if ($this->isColumnModified(CcFilesPeer::MIME)) $criteria->add(CcFilesPeer::MIME, $this->mime);
if ($this->isColumnModified(CcFilesPeer::FTYPE)) $criteria->add(CcFilesPeer::FTYPE, $this->ftype);
+ if ($this->isColumnModified(CcFilesPeer::DIRECTORY)) $criteria->add(CcFilesPeer::DIRECTORY, $this->directory);
if ($this->isColumnModified(CcFilesPeer::FILEPATH)) $criteria->add(CcFilesPeer::FILEPATH, $this->filepath);
if ($this->isColumnModified(CcFilesPeer::STATE)) $criteria->add(CcFilesPeer::STATE, $this->state);
if ($this->isColumnModified(CcFilesPeer::CURRENTLYACCESSING)) $criteria->add(CcFilesPeer::CURRENTLYACCESSING, $this->currentlyaccessing);
@@ -3264,6 +3339,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
$copyObj->setDbName($this->name);
$copyObj->setDbMime($this->mime);
$copyObj->setDbFtype($this->ftype);
+ $copyObj->setDbDirectory($this->directory);
$copyObj->setDbFilepath($this->filepath);
$copyObj->setDbState($this->state);
$copyObj->setDbCurrentlyaccessing($this->currentlyaccessing);
@@ -3425,6 +3501,55 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
return $this->aCcSubjs;
}
+ /**
+ * Declares an association between this object and a CcMusicDirs object.
+ *
+ * @param CcMusicDirs $v
+ * @return CcFiles The current object (for fluent API support)
+ * @throws PropelException
+ */
+ public function setCcMusicDirs(CcMusicDirs $v = null)
+ {
+ if ($v === null) {
+ $this->setDbDirectory(NULL);
+ } else {
+ $this->setDbDirectory($v->getId());
+ }
+
+ $this->aCcMusicDirs = $v;
+
+ // Add binding for other direction of this n:n relationship.
+ // If this object has already been added to the CcMusicDirs object, it will not be re-added.
+ if ($v !== null) {
+ $v->addCcFiles($this);
+ }
+
+ return $this;
+ }
+
+
+ /**
+ * Get the associated CcMusicDirs object
+ *
+ * @param PropelPDO Optional Connection object.
+ * @return CcMusicDirs The associated CcMusicDirs object.
+ * @throws PropelException
+ */
+ public function getCcMusicDirs(PropelPDO $con = null)
+ {
+ if ($this->aCcMusicDirs === null && ($this->directory !== null)) {
+ $this->aCcMusicDirs = CcMusicDirsQuery::create()->findPk($this->directory, $con);
+ /* The following can be used additionally to
+ guarantee the related object contains a reference
+ to this object. This level of coupling may, however, be
+ undesirable since it could result in an only partially populated collection
+ in the referenced object.
+ $this->aCcMusicDirs->addCcFiless($this);
+ */
+ }
+ return $this->aCcMusicDirs;
+ }
+
/**
* Clears out the collCcShowInstancess collection
*
@@ -3728,6 +3853,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
$this->name = null;
$this->mime = null;
$this->ftype = null;
+ $this->directory = null;
$this->filepath = null;
$this->state = null;
$this->currentlyaccessing = null;
@@ -3813,6 +3939,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
$this->collCcShowInstancess = null;
$this->collCcPlaylistcontentss = null;
$this->aCcSubjs = null;
+ $this->aCcMusicDirs = null;
}
/**
diff --git a/airtime_mvc/application/models/airtime/om/BaseCcFilesPeer.php b/airtime_mvc/application/models/airtime/om/BaseCcFilesPeer.php
index db0de6078..0160a948d 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 = 54;
+ const NUM_COLUMNS = 55;
/** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0;
@@ -46,6 +46,9 @@ abstract class BaseCcFilesPeer {
/** the column name for the FTYPE field */
const FTYPE = 'cc_files.FTYPE';
+ /** the column name for the DIRECTORY field */
+ const DIRECTORY = 'cc_files.DIRECTORY';
+
/** the column name for the FILEPATH field */
const FILEPATH = 'cc_files.FILEPATH';
@@ -209,12 +212,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', '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', ),
- BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbGunid', 'dbName', 'dbMime', 'dbFtype', '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', ),
- BasePeer::TYPE_COLNAME => array (self::ID, self::GUNID, self::NAME, self::MIME, self::FTYPE, 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, ),
- BasePeer::TYPE_RAW_COLNAME => array ('ID', 'GUNID', 'NAME', 'MIME', 'FTYPE', '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', ),
- BasePeer::TYPE_FIELDNAME => array ('id', 'gunid', 'name', 'mime', 'ftype', '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', ),
- 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, )
+ 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', ),
+ 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', ),
+ 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, ),
+ 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', ),
+ 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', ),
+ 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, )
);
/**
@@ -224,12 +227,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, 'DbFilepath' => 5, 'DbState' => 6, 'DbCurrentlyaccessing' => 7, 'DbEditedby' => 8, 'DbMtime' => 9, 'DbMd5' => 10, 'DbTrackTitle' => 11, 'DbArtistName' => 12, 'DbBitRate' => 13, 'DbSampleRate' => 14, 'DbFormat' => 15, 'DbLength' => 16, 'DbAlbumTitle' => 17, 'DbGenre' => 18, 'DbComments' => 19, 'DbYear' => 20, 'DbTrackNumber' => 21, 'DbChannels' => 22, 'DbUrl' => 23, 'DbBpm' => 24, 'DbRating' => 25, 'DbEncodedBy' => 26, 'DbDiscNumber' => 27, 'DbMood' => 28, 'DbLabel' => 29, 'DbComposer' => 30, 'DbEncoder' => 31, 'DbChecksum' => 32, 'DbLyrics' => 33, 'DbOrchestra' => 34, 'DbConductor' => 35, 'DbLyricist' => 36, 'DbOriginalLyricist' => 37, 'DbRadioStationName' => 38, 'DbInfoUrl' => 39, 'DbArtistUrl' => 40, 'DbAudioSourceUrl' => 41, 'DbRadioStationUrl' => 42, 'DbBuyThisUrl' => 43, 'DbIsrcNumber' => 44, 'DbCatalogNumber' => 45, 'DbOriginalArtist' => 46, 'DbCopyright' => 47, 'DbReportDatetime' => 48, 'DbReportLocation' => 49, 'DbReportOrganization' => 50, 'DbSubject' => 51, 'DbContributor' => 52, 'DbLanguage' => 53, ),
- BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbGunid' => 1, 'dbName' => 2, 'dbMime' => 3, 'dbFtype' => 4, 'dbFilepath' => 5, 'dbState' => 6, 'dbCurrentlyaccessing' => 7, 'dbEditedby' => 8, 'dbMtime' => 9, 'dbMd5' => 10, 'dbTrackTitle' => 11, 'dbArtistName' => 12, 'dbBitRate' => 13, 'dbSampleRate' => 14, 'dbFormat' => 15, 'dbLength' => 16, 'dbAlbumTitle' => 17, 'dbGenre' => 18, 'dbComments' => 19, 'dbYear' => 20, 'dbTrackNumber' => 21, 'dbChannels' => 22, 'dbUrl' => 23, 'dbBpm' => 24, 'dbRating' => 25, 'dbEncodedBy' => 26, 'dbDiscNumber' => 27, 'dbMood' => 28, 'dbLabel' => 29, 'dbComposer' => 30, 'dbEncoder' => 31, 'dbChecksum' => 32, 'dbLyrics' => 33, 'dbOrchestra' => 34, 'dbConductor' => 35, 'dbLyricist' => 36, 'dbOriginalLyricist' => 37, 'dbRadioStationName' => 38, 'dbInfoUrl' => 39, 'dbArtistUrl' => 40, 'dbAudioSourceUrl' => 41, 'dbRadioStationUrl' => 42, 'dbBuyThisUrl' => 43, 'dbIsrcNumber' => 44, 'dbCatalogNumber' => 45, 'dbOriginalArtist' => 46, 'dbCopyright' => 47, 'dbReportDatetime' => 48, 'dbReportLocation' => 49, 'dbReportOrganization' => 50, 'dbSubject' => 51, 'dbContributor' => 52, 'dbLanguage' => 53, ),
- BasePeer::TYPE_COLNAME => array (self::ID => 0, self::GUNID => 1, self::NAME => 2, self::MIME => 3, self::FTYPE => 4, self::FILEPATH => 5, self::STATE => 6, self::CURRENTLYACCESSING => 7, self::EDITEDBY => 8, self::MTIME => 9, self::MD5 => 10, self::TRACK_TITLE => 11, self::ARTIST_NAME => 12, self::BIT_RATE => 13, self::SAMPLE_RATE => 14, self::FORMAT => 15, self::LENGTH => 16, self::ALBUM_TITLE => 17, self::GENRE => 18, self::COMMENTS => 19, self::YEAR => 20, self::TRACK_NUMBER => 21, self::CHANNELS => 22, self::URL => 23, self::BPM => 24, self::RATING => 25, self::ENCODED_BY => 26, self::DISC_NUMBER => 27, self::MOOD => 28, self::LABEL => 29, self::COMPOSER => 30, self::ENCODER => 31, self::CHECKSUM => 32, self::LYRICS => 33, self::ORCHESTRA => 34, self::CONDUCTOR => 35, self::LYRICIST => 36, self::ORIGINAL_LYRICIST => 37, self::RADIO_STATION_NAME => 38, self::INFO_URL => 39, self::ARTIST_URL => 40, self::AUDIO_SOURCE_URL => 41, self::RADIO_STATION_URL => 42, self::BUY_THIS_URL => 43, self::ISRC_NUMBER => 44, self::CATALOG_NUMBER => 45, self::ORIGINAL_ARTIST => 46, self::COPYRIGHT => 47, self::REPORT_DATETIME => 48, self::REPORT_LOCATION => 49, self::REPORT_ORGANIZATION => 50, self::SUBJECT => 51, self::CONTRIBUTOR => 52, self::LANGUAGE => 53, ),
- BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'GUNID' => 1, 'NAME' => 2, 'MIME' => 3, 'FTYPE' => 4, 'FILEPATH' => 5, 'STATE' => 6, 'CURRENTLYACCESSING' => 7, 'EDITEDBY' => 8, 'MTIME' => 9, 'MD5' => 10, 'TRACK_TITLE' => 11, 'ARTIST_NAME' => 12, 'BIT_RATE' => 13, 'SAMPLE_RATE' => 14, 'FORMAT' => 15, 'LENGTH' => 16, 'ALBUM_TITLE' => 17, 'GENRE' => 18, 'COMMENTS' => 19, 'YEAR' => 20, 'TRACK_NUMBER' => 21, 'CHANNELS' => 22, 'URL' => 23, 'BPM' => 24, 'RATING' => 25, 'ENCODED_BY' => 26, 'DISC_NUMBER' => 27, 'MOOD' => 28, 'LABEL' => 29, 'COMPOSER' => 30, 'ENCODER' => 31, 'CHECKSUM' => 32, 'LYRICS' => 33, 'ORCHESTRA' => 34, 'CONDUCTOR' => 35, 'LYRICIST' => 36, 'ORIGINAL_LYRICIST' => 37, 'RADIO_STATION_NAME' => 38, 'INFO_URL' => 39, 'ARTIST_URL' => 40, 'AUDIO_SOURCE_URL' => 41, 'RADIO_STATION_URL' => 42, 'BUY_THIS_URL' => 43, 'ISRC_NUMBER' => 44, 'CATALOG_NUMBER' => 45, 'ORIGINAL_ARTIST' => 46, 'COPYRIGHT' => 47, 'REPORT_DATETIME' => 48, 'REPORT_LOCATION' => 49, 'REPORT_ORGANIZATION' => 50, 'SUBJECT' => 51, 'CONTRIBUTOR' => 52, 'LANGUAGE' => 53, ),
- BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'gunid' => 1, 'name' => 2, 'mime' => 3, 'ftype' => 4, 'filepath' => 5, 'state' => 6, 'currentlyaccessing' => 7, 'editedby' => 8, 'mtime' => 9, 'md5' => 10, 'track_title' => 11, 'artist_name' => 12, 'bit_rate' => 13, 'sample_rate' => 14, 'format' => 15, 'length' => 16, 'album_title' => 17, 'genre' => 18, 'comments' => 19, 'year' => 20, 'track_number' => 21, 'channels' => 22, 'url' => 23, 'bpm' => 24, 'rating' => 25, 'encoded_by' => 26, 'disc_number' => 27, 'mood' => 28, 'label' => 29, 'composer' => 30, 'encoder' => 31, 'checksum' => 32, 'lyrics' => 33, 'orchestra' => 34, 'conductor' => 35, 'lyricist' => 36, 'original_lyricist' => 37, 'radio_station_name' => 38, 'info_url' => 39, 'artist_url' => 40, 'audio_source_url' => 41, 'radio_station_url' => 42, 'buy_this_url' => 43, 'isrc_number' => 44, 'catalog_number' => 45, 'original_artist' => 46, 'copyright' => 47, 'report_datetime' => 48, 'report_location' => 49, 'report_organization' => 50, 'subject' => 51, 'contributor' => 52, 'language' => 53, ),
- 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, )
+ 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, ),
+ 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, ),
+ 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, ),
+ 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, ),
+ 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, ),
+ 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, )
);
/**
@@ -306,6 +309,7 @@ abstract class BaseCcFilesPeer {
$criteria->addSelectColumn(CcFilesPeer::NAME);
$criteria->addSelectColumn(CcFilesPeer::MIME);
$criteria->addSelectColumn(CcFilesPeer::FTYPE);
+ $criteria->addSelectColumn(CcFilesPeer::DIRECTORY);
$criteria->addSelectColumn(CcFilesPeer::FILEPATH);
$criteria->addSelectColumn(CcFilesPeer::STATE);
$criteria->addSelectColumn(CcFilesPeer::CURRENTLYACCESSING);
@@ -361,6 +365,7 @@ abstract class BaseCcFilesPeer {
$criteria->addSelectColumn($alias . '.NAME');
$criteria->addSelectColumn($alias . '.MIME');
$criteria->addSelectColumn($alias . '.FTYPE');
+ $criteria->addSelectColumn($alias . '.DIRECTORY');
$criteria->addSelectColumn($alias . '.FILEPATH');
$criteria->addSelectColumn($alias . '.STATE');
$criteria->addSelectColumn($alias . '.CURRENTLYACCESSING');
@@ -751,6 +756,56 @@ abstract class BaseCcFilesPeer {
}
+ /**
+ * Returns the number of rows matching criteria, joining the related CcMusicDirs table
+ *
+ * @param Criteria $criteria
+ * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
+ * @param PropelPDO $con
+ * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
+ * @return int Number of matching rows.
+ */
+ public static function doCountJoinCcMusicDirs(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
+ {
+ // we're going to modify criteria, so copy it first
+ $criteria = clone $criteria;
+
+ // We need to set the primary table name, since in the case that there are no WHERE columns
+ // it will be impossible for the BasePeer::createSelectSql() method to determine which
+ // tables go into the FROM clause.
+ $criteria->setPrimaryTableName(CcFilesPeer::TABLE_NAME);
+
+ if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
+ $criteria->setDistinct();
+ }
+
+ if (!$criteria->hasSelectClause()) {
+ CcFilesPeer::addSelectColumns($criteria);
+ }
+
+ $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count
+
+ // Set the correct dbName
+ $criteria->setDbName(self::DATABASE_NAME);
+
+ if ($con === null) {
+ $con = Propel::getConnection(CcFilesPeer::DATABASE_NAME, Propel::CONNECTION_READ);
+ }
+
+ $criteria->addJoin(CcFilesPeer::DIRECTORY, CcMusicDirsPeer::ID, $join_behavior);
+
+ $stmt = BasePeer::doCount($criteria, $con);
+
+ if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
+ $count = (int) $row[0];
+ } else {
+ $count = 0; // no rows returned; we infer that means 0 matches.
+ }
+ $stmt->closeCursor();
+ return $count;
+ }
+
+
/**
* Selects a collection of CcFiles objects pre-filled with their CcSubjs objects.
* @param Criteria $criteria
@@ -817,6 +872,72 @@ abstract class BaseCcFilesPeer {
}
+ /**
+ * Selects a collection of CcFiles objects pre-filled with their CcMusicDirs objects.
+ * @param Criteria $criteria
+ * @param PropelPDO $con
+ * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
+ * @return array Array of CcFiles objects.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectJoinCcMusicDirs(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
+ {
+ $criteria = clone $criteria;
+
+ // Set the correct dbName if it has not been overridden
+ if ($criteria->getDbName() == Propel::getDefaultDB()) {
+ $criteria->setDbName(self::DATABASE_NAME);
+ }
+
+ CcFilesPeer::addSelectColumns($criteria);
+ $startcol = (CcFilesPeer::NUM_COLUMNS - CcFilesPeer::NUM_LAZY_LOAD_COLUMNS);
+ CcMusicDirsPeer::addSelectColumns($criteria);
+
+ $criteria->addJoin(CcFilesPeer::DIRECTORY, CcMusicDirsPeer::ID, $join_behavior);
+
+ $stmt = BasePeer::doSelect($criteria, $con);
+ $results = array();
+
+ while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
+ $key1 = CcFilesPeer::getPrimaryKeyHashFromRow($row, 0);
+ if (null !== ($obj1 = CcFilesPeer::getInstanceFromPool($key1))) {
+ // We no longer rehydrate the object, since this can cause data loss.
+ // See http://www.propelorm.org/ticket/509
+ // $obj1->hydrate($row, 0, true); // rehydrate
+ } else {
+
+ $cls = CcFilesPeer::getOMClass(false);
+
+ $obj1 = new $cls();
+ $obj1->hydrate($row);
+ CcFilesPeer::addInstanceToPool($obj1, $key1);
+ } // if $obj1 already loaded
+
+ $key2 = CcMusicDirsPeer::getPrimaryKeyHashFromRow($row, $startcol);
+ if ($key2 !== null) {
+ $obj2 = CcMusicDirsPeer::getInstanceFromPool($key2);
+ if (!$obj2) {
+
+ $cls = CcMusicDirsPeer::getOMClass(false);
+
+ $obj2 = new $cls();
+ $obj2->hydrate($row, $startcol);
+ CcMusicDirsPeer::addInstanceToPool($obj2, $key2);
+ } // if obj2 already loaded
+
+ // Add the $obj1 (CcFiles) to $obj2 (CcMusicDirs)
+ $obj2->addCcFiles($obj1);
+
+ } // if joined row was not null
+
+ $results[] = $obj1;
+ }
+ $stmt->closeCursor();
+ return $results;
+ }
+
+
/**
* Returns the number of rows matching criteria, joining all related tables
*
@@ -855,6 +976,8 @@ abstract class BaseCcFilesPeer {
$criteria->addJoin(CcFilesPeer::EDITEDBY, CcSubjsPeer::ID, $join_behavior);
+ $criteria->addJoin(CcFilesPeer::DIRECTORY, CcMusicDirsPeer::ID, $join_behavior);
+
$stmt = BasePeer::doCount($criteria, $con);
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
@@ -891,8 +1014,13 @@ abstract class BaseCcFilesPeer {
CcSubjsPeer::addSelectColumns($criteria);
$startcol3 = $startcol2 + (CcSubjsPeer::NUM_COLUMNS - CcSubjsPeer::NUM_LAZY_LOAD_COLUMNS);
+ CcMusicDirsPeer::addSelectColumns($criteria);
+ $startcol4 = $startcol3 + (CcMusicDirsPeer::NUM_COLUMNS - CcMusicDirsPeer::NUM_LAZY_LOAD_COLUMNS);
+
$criteria->addJoin(CcFilesPeer::EDITEDBY, CcSubjsPeer::ID, $join_behavior);
+ $criteria->addJoin(CcFilesPeer::DIRECTORY, CcMusicDirsPeer::ID, $join_behavior);
+
$stmt = BasePeer::doSelect($criteria, $con);
$results = array();
@@ -928,6 +1056,270 @@ abstract class BaseCcFilesPeer {
$obj2->addCcFiles($obj1);
} // if joined row not null
+ // Add objects for joined CcMusicDirs rows
+
+ $key3 = CcMusicDirsPeer::getPrimaryKeyHashFromRow($row, $startcol3);
+ if ($key3 !== null) {
+ $obj3 = CcMusicDirsPeer::getInstanceFromPool($key3);
+ if (!$obj3) {
+
+ $cls = CcMusicDirsPeer::getOMClass(false);
+
+ $obj3 = new $cls();
+ $obj3->hydrate($row, $startcol3);
+ CcMusicDirsPeer::addInstanceToPool($obj3, $key3);
+ } // if obj3 loaded
+
+ // Add the $obj1 (CcFiles) to the collection in $obj3 (CcMusicDirs)
+ $obj3->addCcFiles($obj1);
+ } // if joined row not null
+
+ $results[] = $obj1;
+ }
+ $stmt->closeCursor();
+ return $results;
+ }
+
+
+ /**
+ * Returns the number of rows matching criteria, joining the related CcSubjs table
+ *
+ * @param Criteria $criteria
+ * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
+ * @param PropelPDO $con
+ * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
+ * @return int Number of matching rows.
+ */
+ public static function doCountJoinAllExceptCcSubjs(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
+ {
+ // we're going to modify criteria, so copy it first
+ $criteria = clone $criteria;
+
+ // We need to set the primary table name, since in the case that there are no WHERE columns
+ // it will be impossible for the BasePeer::createSelectSql() method to determine which
+ // tables go into the FROM clause.
+ $criteria->setPrimaryTableName(CcFilesPeer::TABLE_NAME);
+
+ if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
+ $criteria->setDistinct();
+ }
+
+ if (!$criteria->hasSelectClause()) {
+ CcFilesPeer::addSelectColumns($criteria);
+ }
+
+ $criteria->clearOrderByColumns(); // ORDER BY should not affect count
+
+ // Set the correct dbName
+ $criteria->setDbName(self::DATABASE_NAME);
+
+ if ($con === null) {
+ $con = Propel::getConnection(CcFilesPeer::DATABASE_NAME, Propel::CONNECTION_READ);
+ }
+
+ $criteria->addJoin(CcFilesPeer::DIRECTORY, CcMusicDirsPeer::ID, $join_behavior);
+
+ $stmt = BasePeer::doCount($criteria, $con);
+
+ if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
+ $count = (int) $row[0];
+ } else {
+ $count = 0; // no rows returned; we infer that means 0 matches.
+ }
+ $stmt->closeCursor();
+ return $count;
+ }
+
+
+ /**
+ * Returns the number of rows matching criteria, joining the related CcMusicDirs table
+ *
+ * @param Criteria $criteria
+ * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
+ * @param PropelPDO $con
+ * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
+ * @return int Number of matching rows.
+ */
+ public static function doCountJoinAllExceptCcMusicDirs(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
+ {
+ // we're going to modify criteria, so copy it first
+ $criteria = clone $criteria;
+
+ // We need to set the primary table name, since in the case that there are no WHERE columns
+ // it will be impossible for the BasePeer::createSelectSql() method to determine which
+ // tables go into the FROM clause.
+ $criteria->setPrimaryTableName(CcFilesPeer::TABLE_NAME);
+
+ if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
+ $criteria->setDistinct();
+ }
+
+ if (!$criteria->hasSelectClause()) {
+ CcFilesPeer::addSelectColumns($criteria);
+ }
+
+ $criteria->clearOrderByColumns(); // ORDER BY should not affect count
+
+ // Set the correct dbName
+ $criteria->setDbName(self::DATABASE_NAME);
+
+ if ($con === null) {
+ $con = Propel::getConnection(CcFilesPeer::DATABASE_NAME, Propel::CONNECTION_READ);
+ }
+
+ $criteria->addJoin(CcFilesPeer::EDITEDBY, CcSubjsPeer::ID, $join_behavior);
+
+ $stmt = BasePeer::doCount($criteria, $con);
+
+ if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
+ $count = (int) $row[0];
+ } else {
+ $count = 0; // no rows returned; we infer that means 0 matches.
+ }
+ $stmt->closeCursor();
+ return $count;
+ }
+
+
+ /**
+ * Selects a collection of CcFiles objects pre-filled with all related objects except CcSubjs.
+ *
+ * @param Criteria $criteria
+ * @param PropelPDO $con
+ * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
+ * @return array Array of CcFiles objects.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectJoinAllExceptCcSubjs(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
+ {
+ $criteria = clone $criteria;
+
+ // Set the correct dbName if it has not been overridden
+ // $criteria->getDbName() will return the same object if not set to another value
+ // so == check is okay and faster
+ if ($criteria->getDbName() == Propel::getDefaultDB()) {
+ $criteria->setDbName(self::DATABASE_NAME);
+ }
+
+ CcFilesPeer::addSelectColumns($criteria);
+ $startcol2 = (CcFilesPeer::NUM_COLUMNS - CcFilesPeer::NUM_LAZY_LOAD_COLUMNS);
+
+ CcMusicDirsPeer::addSelectColumns($criteria);
+ $startcol3 = $startcol2 + (CcMusicDirsPeer::NUM_COLUMNS - CcMusicDirsPeer::NUM_LAZY_LOAD_COLUMNS);
+
+ $criteria->addJoin(CcFilesPeer::DIRECTORY, CcMusicDirsPeer::ID, $join_behavior);
+
+
+ $stmt = BasePeer::doSelect($criteria, $con);
+ $results = array();
+
+ while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
+ $key1 = CcFilesPeer::getPrimaryKeyHashFromRow($row, 0);
+ if (null !== ($obj1 = CcFilesPeer::getInstanceFromPool($key1))) {
+ // We no longer rehydrate the object, since this can cause data loss.
+ // See http://www.propelorm.org/ticket/509
+ // $obj1->hydrate($row, 0, true); // rehydrate
+ } else {
+ $cls = CcFilesPeer::getOMClass(false);
+
+ $obj1 = new $cls();
+ $obj1->hydrate($row);
+ CcFilesPeer::addInstanceToPool($obj1, $key1);
+ } // if obj1 already loaded
+
+ // Add objects for joined CcMusicDirs rows
+
+ $key2 = CcMusicDirsPeer::getPrimaryKeyHashFromRow($row, $startcol2);
+ if ($key2 !== null) {
+ $obj2 = CcMusicDirsPeer::getInstanceFromPool($key2);
+ if (!$obj2) {
+
+ $cls = CcMusicDirsPeer::getOMClass(false);
+
+ $obj2 = new $cls();
+ $obj2->hydrate($row, $startcol2);
+ CcMusicDirsPeer::addInstanceToPool($obj2, $key2);
+ } // if $obj2 already loaded
+
+ // Add the $obj1 (CcFiles) to the collection in $obj2 (CcMusicDirs)
+ $obj2->addCcFiles($obj1);
+
+ } // if joined row is not null
+
+ $results[] = $obj1;
+ }
+ $stmt->closeCursor();
+ return $results;
+ }
+
+
+ /**
+ * Selects a collection of CcFiles objects pre-filled with all related objects except CcMusicDirs.
+ *
+ * @param Criteria $criteria
+ * @param PropelPDO $con
+ * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
+ * @return array Array of CcFiles objects.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectJoinAllExceptCcMusicDirs(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
+ {
+ $criteria = clone $criteria;
+
+ // Set the correct dbName if it has not been overridden
+ // $criteria->getDbName() will return the same object if not set to another value
+ // so == check is okay and faster
+ if ($criteria->getDbName() == Propel::getDefaultDB()) {
+ $criteria->setDbName(self::DATABASE_NAME);
+ }
+
+ CcFilesPeer::addSelectColumns($criteria);
+ $startcol2 = (CcFilesPeer::NUM_COLUMNS - CcFilesPeer::NUM_LAZY_LOAD_COLUMNS);
+
+ CcSubjsPeer::addSelectColumns($criteria);
+ $startcol3 = $startcol2 + (CcSubjsPeer::NUM_COLUMNS - CcSubjsPeer::NUM_LAZY_LOAD_COLUMNS);
+
+ $criteria->addJoin(CcFilesPeer::EDITEDBY, CcSubjsPeer::ID, $join_behavior);
+
+
+ $stmt = BasePeer::doSelect($criteria, $con);
+ $results = array();
+
+ while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
+ $key1 = CcFilesPeer::getPrimaryKeyHashFromRow($row, 0);
+ if (null !== ($obj1 = CcFilesPeer::getInstanceFromPool($key1))) {
+ // We no longer rehydrate the object, since this can cause data loss.
+ // See http://www.propelorm.org/ticket/509
+ // $obj1->hydrate($row, 0, true); // rehydrate
+ } else {
+ $cls = CcFilesPeer::getOMClass(false);
+
+ $obj1 = new $cls();
+ $obj1->hydrate($row);
+ CcFilesPeer::addInstanceToPool($obj1, $key1);
+ } // if obj1 already loaded
+
+ // Add objects for joined CcSubjs rows
+
+ $key2 = CcSubjsPeer::getPrimaryKeyHashFromRow($row, $startcol2);
+ if ($key2 !== null) {
+ $obj2 = CcSubjsPeer::getInstanceFromPool($key2);
+ if (!$obj2) {
+
+ $cls = CcSubjsPeer::getOMClass(false);
+
+ $obj2 = new $cls();
+ $obj2->hydrate($row, $startcol2);
+ CcSubjsPeer::addInstanceToPool($obj2, $key2);
+ } // if $obj2 already loaded
+
+ // Add the $obj1 (CcFiles) to the collection in $obj2 (CcSubjs)
+ $obj2->addCcFiles($obj1);
+
+ } // if joined row is not null
+
$results[] = $obj1;
}
$stmt->closeCursor();
diff --git a/airtime_mvc/application/models/airtime/om/BaseCcFilesQuery.php b/airtime_mvc/application/models/airtime/om/BaseCcFilesQuery.php
index c7dd35f3e..9080466fa 100644
--- a/airtime_mvc/application/models/airtime/om/BaseCcFilesQuery.php
+++ b/airtime_mvc/application/models/airtime/om/BaseCcFilesQuery.php
@@ -11,6 +11,7 @@
* @method CcFilesQuery orderByDbName($order = Criteria::ASC) Order by the name column
* @method CcFilesQuery orderByDbMime($order = Criteria::ASC) Order by the mime column
* @method CcFilesQuery orderByDbFtype($order = Criteria::ASC) Order by the ftype column
+ * @method CcFilesQuery orderByDbDirectory($order = Criteria::ASC) Order by the directory column
* @method CcFilesQuery orderByDbFilepath($order = Criteria::ASC) Order by the filepath column
* @method CcFilesQuery orderByDbState($order = Criteria::ASC) Order by the state column
* @method CcFilesQuery orderByDbCurrentlyaccessing($order = Criteria::ASC) Order by the currentlyaccessing column
@@ -66,6 +67,7 @@
* @method CcFilesQuery groupByDbName() Group by the name column
* @method CcFilesQuery groupByDbMime() Group by the mime column
* @method CcFilesQuery groupByDbFtype() Group by the ftype column
+ * @method CcFilesQuery groupByDbDirectory() Group by the directory column
* @method CcFilesQuery groupByDbFilepath() Group by the filepath column
* @method CcFilesQuery groupByDbState() Group by the state column
* @method CcFilesQuery groupByDbCurrentlyaccessing() Group by the currentlyaccessing column
@@ -124,6 +126,10 @@
* @method CcFilesQuery rightJoinCcSubjs($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcSubjs relation
* @method CcFilesQuery innerJoinCcSubjs($relationAlias = '') Adds a INNER JOIN clause to the query using the CcSubjs relation
*
+ * @method CcFilesQuery leftJoinCcMusicDirs($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcMusicDirs relation
+ * @method CcFilesQuery rightJoinCcMusicDirs($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcMusicDirs relation
+ * @method CcFilesQuery innerJoinCcMusicDirs($relationAlias = '') Adds a INNER JOIN clause to the query using the CcMusicDirs relation
+ *
* @method CcFilesQuery leftJoinCcShowInstances($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcShowInstances relation
* @method CcFilesQuery rightJoinCcShowInstances($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcShowInstances relation
* @method CcFilesQuery innerJoinCcShowInstances($relationAlias = '') Adds a INNER JOIN clause to the query using the CcShowInstances relation
@@ -140,6 +146,7 @@
* @method CcFiles findOneByDbName(string $name) Return the first CcFiles filtered by the name column
* @method CcFiles findOneByDbMime(string $mime) Return the first CcFiles filtered by the mime column
* @method CcFiles findOneByDbFtype(string $ftype) Return the first CcFiles filtered by the ftype column
+ * @method CcFiles findOneByDbDirectory(int $directory) Return the first CcFiles filtered by the directory column
* @method CcFiles findOneByDbFilepath(string $filepath) Return the first CcFiles filtered by the filepath column
* @method CcFiles findOneByDbState(string $state) Return the first CcFiles filtered by the state column
* @method CcFiles findOneByDbCurrentlyaccessing(int $currentlyaccessing) Return the first CcFiles filtered by the currentlyaccessing column
@@ -195,6 +202,7 @@
* @method array findByDbName(string $name) Return CcFiles objects filtered by the name column
* @method array findByDbMime(string $mime) Return CcFiles objects filtered by the mime column
* @method array findByDbFtype(string $ftype) Return CcFiles objects filtered by the ftype column
+ * @method array findByDbDirectory(int $directory) Return CcFiles objects filtered by the directory column
* @method array findByDbFilepath(string $filepath) Return CcFiles objects filtered by the filepath column
* @method array findByDbState(string $state) Return CcFiles objects filtered by the state column
* @method array findByDbCurrentlyaccessing(int $currentlyaccessing) Return CcFiles objects filtered by the currentlyaccessing column
@@ -458,6 +466,37 @@ abstract class BaseCcFilesQuery extends ModelCriteria
return $this->addUsingAlias(CcFilesPeer::FTYPE, $dbFtype, $comparison);
}
+ /**
+ * Filter the query on the directory column
+ *
+ * @param int|array $dbDirectory 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 filterByDbDirectory($dbDirectory = null, $comparison = null)
+ {
+ if (is_array($dbDirectory)) {
+ $useMinMax = false;
+ if (isset($dbDirectory['min'])) {
+ $this->addUsingAlias(CcFilesPeer::DIRECTORY, $dbDirectory['min'], Criteria::GREATER_EQUAL);
+ $useMinMax = true;
+ }
+ if (isset($dbDirectory['max'])) {
+ $this->addUsingAlias(CcFilesPeer::DIRECTORY, $dbDirectory['max'], Criteria::LESS_EQUAL);
+ $useMinMax = true;
+ }
+ if ($useMinMax) {
+ return $this;
+ }
+ if (null === $comparison) {
+ $comparison = Criteria::IN;
+ }
+ }
+ return $this->addUsingAlias(CcFilesPeer::DIRECTORY, $dbDirectory, $comparison);
+ }
+
/**
* Filter the query on the filepath column
*
@@ -1654,6 +1693,70 @@ abstract class BaseCcFilesQuery extends ModelCriteria
->useQuery($relationAlias ? $relationAlias : 'CcSubjs', 'CcSubjsQuery');
}
+ /**
+ * Filter the query by a related CcMusicDirs object
+ *
+ * @param CcMusicDirs $ccMusicDirs the related object to use as filter
+ * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ *
+ * @return CcFilesQuery The current query, for fluid interface
+ */
+ public function filterByCcMusicDirs($ccMusicDirs, $comparison = null)
+ {
+ return $this
+ ->addUsingAlias(CcFilesPeer::DIRECTORY, $ccMusicDirs->getId(), $comparison);
+ }
+
+ /**
+ * Adds a JOIN clause to the query using the CcMusicDirs relation
+ *
+ * @param string $relationAlias optional alias for the relation
+ * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ *
+ * @return CcFilesQuery The current query, for fluid interface
+ */
+ public function joinCcMusicDirs($relationAlias = '', $joinType = Criteria::LEFT_JOIN)
+ {
+ $tableMap = $this->getTableMap();
+ $relationMap = $tableMap->getRelation('CcMusicDirs');
+
+ // create a ModelJoin object for this join
+ $join = new ModelJoin();
+ $join->setJoinType($joinType);
+ $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
+ if ($previousJoin = $this->getPreviousJoin()) {
+ $join->setPreviousJoin($previousJoin);
+ }
+
+ // add the ModelJoin to the current object
+ if($relationAlias) {
+ $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
+ $this->addJoinObject($join, $relationAlias);
+ } else {
+ $this->addJoinObject($join, 'CcMusicDirs');
+ }
+
+ return $this;
+ }
+
+ /**
+ * Use the CcMusicDirs relation CcMusicDirs object
+ *
+ * @see useQuery()
+ *
+ * @param string $relationAlias optional alias for the relation,
+ * to be used as main alias in the secondary query
+ * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ *
+ * @return CcMusicDirsQuery A secondary query class using the current class as primary query
+ */
+ public function useCcMusicDirsQuery($relationAlias = '', $joinType = Criteria::LEFT_JOIN)
+ {
+ return $this
+ ->joinCcMusicDirs($relationAlias, $joinType)
+ ->useQuery($relationAlias ? $relationAlias : 'CcMusicDirs', 'CcMusicDirsQuery');
+ }
+
/**
* Filter the query by a related CcShowInstances object
*
diff --git a/airtime_mvc/application/models/airtime/om/BaseCcMusicDirs.php b/airtime_mvc/application/models/airtime/om/BaseCcMusicDirs.php
new file mode 100644
index 000000000..8458eed2f
--- /dev/null
+++ b/airtime_mvc/application/models/airtime/om/BaseCcMusicDirs.php
@@ -0,0 +1,941 @@
+id;
+ }
+
+ /**
+ * Get the [directory] column value.
+ *
+ * @return string
+ */
+ public function getDirectory()
+ {
+ return $this->directory;
+ }
+
+ /**
+ * Get the [type] column value.
+ *
+ * @return string
+ */
+ public function getType()
+ {
+ return $this->type;
+ }
+
+ /**
+ * Set the value of [id] column.
+ *
+ * @param int $v new value
+ * @return CcMusicDirs The current object (for fluent API support)
+ */
+ public function setId($v)
+ {
+ if ($v !== null) {
+ $v = (int) $v;
+ }
+
+ if ($this->id !== $v) {
+ $this->id = $v;
+ $this->modifiedColumns[] = CcMusicDirsPeer::ID;
+ }
+
+ return $this;
+ } // setId()
+
+ /**
+ * Set the value of [directory] column.
+ *
+ * @param string $v new value
+ * @return CcMusicDirs The current object (for fluent API support)
+ */
+ public function setDirectory($v)
+ {
+ if ($v !== null) {
+ $v = (string) $v;
+ }
+
+ if ($this->directory !== $v) {
+ $this->directory = $v;
+ $this->modifiedColumns[] = CcMusicDirsPeer::DIRECTORY;
+ }
+
+ return $this;
+ } // setDirectory()
+
+ /**
+ * Set the value of [type] column.
+ *
+ * @param string $v new value
+ * @return CcMusicDirs The current object (for fluent API support)
+ */
+ public function setType($v)
+ {
+ if ($v !== null) {
+ $v = (string) $v;
+ }
+
+ if ($this->type !== $v) {
+ $this->type = $v;
+ $this->modifiedColumns[] = CcMusicDirsPeer::TYPE;
+ }
+
+ return $this;
+ } // setType()
+
+ /**
+ * Indicates whether the columns in this object are only set to default values.
+ *
+ * This method can be used in conjunction with isModified() to indicate whether an object is both
+ * modified _and_ has some values set which are non-default.
+ *
+ * @return boolean Whether the columns in this object are only been set with default values.
+ */
+ public function hasOnlyDefaultValues()
+ {
+ // otherwise, everything was equal, so return TRUE
+ return true;
+ } // hasOnlyDefaultValues()
+
+ /**
+ * Hydrates (populates) the object variables with values from the database resultset.
+ *
+ * An offset (0-based "start column") is specified so that objects can be hydrated
+ * with a subset of the columns in the resultset rows. This is needed, for example,
+ * for results of JOIN queries where the resultset row includes columns from two or
+ * more tables.
+ *
+ * @param array $row The row returned by PDOStatement->fetch(PDO::FETCH_NUM)
+ * @param int $startcol 0-based offset column which indicates which restultset column to start with.
+ * @param boolean $rehydrate Whether this object is being re-hydrated from the database.
+ * @return int next starting column
+ * @throws PropelException - Any caught Exception will be rewrapped as a PropelException.
+ */
+ public function hydrate($row, $startcol = 0, $rehydrate = false)
+ {
+ try {
+
+ $this->id = ($row[$startcol + 0] !== null) ? (int) $row[$startcol + 0] : null;
+ $this->directory = ($row[$startcol + 1] !== null) ? (string) $row[$startcol + 1] : null;
+ $this->type = ($row[$startcol + 2] !== null) ? (string) $row[$startcol + 2] : null;
+ $this->resetModified();
+
+ $this->setNew(false);
+
+ if ($rehydrate) {
+ $this->ensureConsistency();
+ }
+
+ return $startcol + 3; // 3 = CcMusicDirsPeer::NUM_COLUMNS - CcMusicDirsPeer::NUM_LAZY_LOAD_COLUMNS).
+
+ } catch (Exception $e) {
+ throw new PropelException("Error populating CcMusicDirs object", $e);
+ }
+ }
+
+ /**
+ * Checks and repairs the internal consistency of the object.
+ *
+ * This method is executed after an already-instantiated object is re-hydrated
+ * from the database. It exists to check any foreign keys to make sure that
+ * the objects related to the current object are correct based on foreign key.
+ *
+ * You can override this method in the stub class, but you should always invoke
+ * the base method from the overridden method (i.e. parent::ensureConsistency()),
+ * in case your model changes.
+ *
+ * @throws PropelException
+ */
+ public function ensureConsistency()
+ {
+
+ } // ensureConsistency
+
+ /**
+ * Reloads this object from datastore based on primary key and (optionally) resets all associated objects.
+ *
+ * This will only work if the object has been saved and has a valid primary key set.
+ *
+ * @param boolean $deep (optional) Whether to also de-associated any related objects.
+ * @param PropelPDO $con (optional) The PropelPDO connection to use.
+ * @return void
+ * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db
+ */
+ public function reload($deep = false, PropelPDO $con = null)
+ {
+ if ($this->isDeleted()) {
+ throw new PropelException("Cannot reload a deleted object.");
+ }
+
+ if ($this->isNew()) {
+ throw new PropelException("Cannot reload an unsaved object.");
+ }
+
+ if ($con === null) {
+ $con = Propel::getConnection(CcMusicDirsPeer::DATABASE_NAME, Propel::CONNECTION_READ);
+ }
+
+ // We don't need to alter the object instance pool; we're just modifying this instance
+ // already in the pool.
+
+ $stmt = CcMusicDirsPeer::doSelectStmt($this->buildPkeyCriteria(), $con);
+ $row = $stmt->fetch(PDO::FETCH_NUM);
+ $stmt->closeCursor();
+ if (!$row) {
+ throw new PropelException('Cannot find matching row in the database to reload object values.');
+ }
+ $this->hydrate($row, 0, true); // rehydrate
+
+ if ($deep) { // also de-associate any related objects?
+
+ $this->collCcFiless = null;
+
+ } // if (deep)
+ }
+
+ /**
+ * Removes this object from datastore and sets delete attribute.
+ *
+ * @param PropelPDO $con
+ * @return void
+ * @throws PropelException
+ * @see BaseObject::setDeleted()
+ * @see BaseObject::isDeleted()
+ */
+ public function delete(PropelPDO $con = null)
+ {
+ if ($this->isDeleted()) {
+ throw new PropelException("This object has already been deleted.");
+ }
+
+ if ($con === null) {
+ $con = Propel::getConnection(CcMusicDirsPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
+ }
+
+ $con->beginTransaction();
+ try {
+ $ret = $this->preDelete($con);
+ if ($ret) {
+ CcMusicDirsQuery::create()
+ ->filterByPrimaryKey($this->getPrimaryKey())
+ ->delete($con);
+ $this->postDelete($con);
+ $con->commit();
+ $this->setDeleted(true);
+ } else {
+ $con->commit();
+ }
+ } catch (PropelException $e) {
+ $con->rollBack();
+ throw $e;
+ }
+ }
+
+ /**
+ * Persists this object to the database.
+ *
+ * If the object is new, it inserts it; otherwise an update is performed.
+ * All modified related objects will also be persisted in the doSave()
+ * method. This method wraps all precipitate database operations in a
+ * single transaction.
+ *
+ * @param PropelPDO $con
+ * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations.
+ * @throws PropelException
+ * @see doSave()
+ */
+ public function save(PropelPDO $con = null)
+ {
+ if ($this->isDeleted()) {
+ throw new PropelException("You cannot save an object that has been deleted.");
+ }
+
+ if ($con === null) {
+ $con = Propel::getConnection(CcMusicDirsPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
+ }
+
+ $con->beginTransaction();
+ $isInsert = $this->isNew();
+ try {
+ $ret = $this->preSave($con);
+ if ($isInsert) {
+ $ret = $ret && $this->preInsert($con);
+ } else {
+ $ret = $ret && $this->preUpdate($con);
+ }
+ if ($ret) {
+ $affectedRows = $this->doSave($con);
+ if ($isInsert) {
+ $this->postInsert($con);
+ } else {
+ $this->postUpdate($con);
+ }
+ $this->postSave($con);
+ CcMusicDirsPeer::addInstanceToPool($this);
+ } else {
+ $affectedRows = 0;
+ }
+ $con->commit();
+ return $affectedRows;
+ } catch (PropelException $e) {
+ $con->rollBack();
+ throw $e;
+ }
+ }
+
+ /**
+ * Performs the work of inserting or updating the row in the database.
+ *
+ * If the object is new, it inserts it; otherwise an update is performed.
+ * All related objects are also updated in this method.
+ *
+ * @param PropelPDO $con
+ * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations.
+ * @throws PropelException
+ * @see save()
+ */
+ protected function doSave(PropelPDO $con)
+ {
+ $affectedRows = 0; // initialize var to track total num of affected rows
+ if (!$this->alreadyInSave) {
+ $this->alreadyInSave = true;
+
+ if ($this->isNew() ) {
+ $this->modifiedColumns[] = CcMusicDirsPeer::ID;
+ }
+
+ // If this object has been modified, then save it to the database.
+ if ($this->isModified()) {
+ if ($this->isNew()) {
+ $criteria = $this->buildCriteria();
+ if ($criteria->keyContainsValue(CcMusicDirsPeer::ID) ) {
+ throw new PropelException('Cannot insert a value for auto-increment primary key ('.CcMusicDirsPeer::ID.')');
+ }
+
+ $pk = BasePeer::doInsert($criteria, $con);
+ $affectedRows = 1;
+ $this->setId($pk); //[IMV] update autoincrement primary key
+ $this->setNew(false);
+ } else {
+ $affectedRows = CcMusicDirsPeer::doUpdate($this, $con);
+ }
+
+ $this->resetModified(); // [HL] After being saved an object is no longer 'modified'
+ }
+
+ if ($this->collCcFiless !== null) {
+ foreach ($this->collCcFiless as $referrerFK) {
+ if (!$referrerFK->isDeleted()) {
+ $affectedRows += $referrerFK->save($con);
+ }
+ }
+ }
+
+ $this->alreadyInSave = false;
+
+ }
+ return $affectedRows;
+ } // doSave()
+
+ /**
+ * Array of ValidationFailed objects.
+ * @var array ValidationFailed[]
+ */
+ protected $validationFailures = array();
+
+ /**
+ * Gets any ValidationFailed objects that resulted from last call to validate().
+ *
+ *
+ * @return array ValidationFailed[]
+ * @see validate()
+ */
+ public function getValidationFailures()
+ {
+ return $this->validationFailures;
+ }
+
+ /**
+ * Validates the objects modified field values and all objects related to this table.
+ *
+ * If $columns is either a column name or an array of column names
+ * only those columns are validated.
+ *
+ * @param mixed $columns Column name or an array of column names.
+ * @return boolean Whether all columns pass validation.
+ * @see doValidate()
+ * @see getValidationFailures()
+ */
+ public function validate($columns = null)
+ {
+ $res = $this->doValidate($columns);
+ if ($res === true) {
+ $this->validationFailures = array();
+ return true;
+ } else {
+ $this->validationFailures = $res;
+ return false;
+ }
+ }
+
+ /**
+ * This function performs the validation work for complex object models.
+ *
+ * In addition to checking the current object, all related objects will
+ * also be validated. If all pass then
element->getSubform('preferences_soundcloud') ?>
diff --git a/airtime_mvc/application/views/scripts/form/preferences_general.phtml b/airtime_mvc/application/views/scripts/form/preferences_general.phtml
index 0f4ca0743..f5d2761e3 100644
--- a/airtime_mvc/application/views/scripts/form/preferences_general.phtml
+++ b/airtime_mvc/application/views/scripts/form/preferences_general.phtml
@@ -73,19 +73,5 @@
-
- element->getElement('watchedFolder')->getLabel() ?>
-
-
- element->getElement('watchedFolder') ?>
- element->getElement('watchedFolder')->hasErrors()) : ?>
-
- element->getElement('watchedFolder')->getMessages() as $error): ?>
-
-
-
-
-
-
diff --git a/airtime_mvc/application/views/scripts/form/preferences_watched_dirs.phtml b/airtime_mvc/application/views/scripts/form/preferences_watched_dirs.phtml
new file mode 100644
index 000000000..a993fb0cd
--- /dev/null
+++ b/airtime_mvc/application/views/scripts/form/preferences_watched_dirs.phtml
@@ -0,0 +1,31 @@
+
+
+
+ element->getElement('watchedFolder')->getLabel() ?>
+
+
+ element->getElement('watchedFolder') ?>
+
+ element->getElement('watchedFolder')->hasErrors()) : ?>
+
+ element->getElement('watchedFolder')->getMessages() as $error): ?>
+
+
+
+
+
+
+
+
+
+
+ element->getElement("watched_dir_$i"); ?>
+
+
getValue(); ?>
+
+ element->getElement("watched_dir_$i"); ?>
+
+
+
+
+
diff --git a/airtime_mvc/application/views/scripts/preference/directory-config.phtml b/airtime_mvc/application/views/scripts/preference/directory-config.phtml
new file mode 100644
index 000000000..d94f0b4a2
--- /dev/null
+++ b/airtime_mvc/application/views/scripts/preference/directory-config.phtml
@@ -0,0 +1,3 @@
+
+form; ?>
+
diff --git a/airtime_mvc/build/schema.xml b/airtime_mvc/build/schema.xml
index 1546e3e0c..5a6aeb342 100644
--- a/airtime_mvc/build/schema.xml
+++ b/airtime_mvc/build/schema.xml
@@ -24,12 +24,21 @@
+
+
@@ -82,6 +91,9 @@
+
+
+
diff --git a/airtime_mvc/build/sql/schema.sql b/airtime_mvc/build/sql/schema.sql
index 8cf1d3a73..ffc00193e 100644
--- a/airtime_mvc/build/sql/schema.sql
+++ b/airtime_mvc/build/sql/schema.sql
@@ -30,6 +30,26 @@ CREATE INDEX "cc_access_parent_idx" ON "cc_access" ("parent");
CREATE INDEX "cc_access_token_idx" ON "cc_access" ("token");
+-----------------------------------------------------------------------------
+-- cc_music_dirs
+-----------------------------------------------------------------------------
+
+DROP TABLE "cc_music_dirs" CASCADE;
+
+
+CREATE TABLE "cc_music_dirs"
+(
+ "id" serial NOT NULL,
+ "directory" TEXT,
+ "type" VARCHAR(255),
+ PRIMARY KEY ("id"),
+ CONSTRAINT "cc_music_dir_unique" UNIQUE ("directory")
+);
+
+COMMENT ON TABLE "cc_music_dirs" IS '';
+
+
+SET search_path TO public;
-----------------------------------------------------------------------------
-- cc_files
-----------------------------------------------------------------------------
@@ -44,6 +64,7 @@ CREATE TABLE "cc_files"
"name" VARCHAR(255) default '' NOT NULL,
"mime" VARCHAR(255) default '' NOT NULL,
"ftype" VARCHAR(128) default '' NOT NULL,
+ "directory" INTEGER,
"filepath" TEXT default '',
"state" VARCHAR(128) default 'empty' NOT NULL,
"currentlyaccessing" INTEGER default 0 NOT NULL,
@@ -426,6 +447,8 @@ ALTER TABLE "cc_access" ADD CONSTRAINT "cc_access_owner_fkey" FOREIGN KEY ("owne
ALTER TABLE "cc_files" ADD CONSTRAINT "cc_files_editedby_fkey" FOREIGN KEY ("editedby") REFERENCES "cc_subjs" ("id");
+ALTER TABLE "cc_files" ADD CONSTRAINT "cc_music_dirs_folder_fkey" FOREIGN KEY ("directory") REFERENCES "cc_music_dirs" ("id") ON DELETE CASCADE;
+
ALTER TABLE "cc_perms" ADD CONSTRAINT "cc_perms_subj_fkey" FOREIGN KEY ("subj") REFERENCES "cc_subjs" ("id") ON DELETE CASCADE;
ALTER TABLE "cc_show_instances" ADD CONSTRAINT "cc_show_fkey" FOREIGN KEY ("show_id") REFERENCES "cc_show" ("id") ON DELETE CASCADE;
diff --git a/airtime_mvc/public/css/img/desktop.png b/airtime_mvc/public/css/img/desktop.png
new file mode 100644
index 000000000..bb5245ff7
Binary files /dev/null and b/airtime_mvc/public/css/img/desktop.png differ
diff --git a/airtime_mvc/public/css/img/documents.png b/airtime_mvc/public/css/img/documents.png
new file mode 100644
index 000000000..9e9d10290
Binary files /dev/null and b/airtime_mvc/public/css/img/documents.png differ
diff --git a/airtime_mvc/public/css/img/folder.png b/airtime_mvc/public/css/img/folder.png
new file mode 100644
index 000000000..b5acdc559
Binary files /dev/null and b/airtime_mvc/public/css/img/folder.png differ
diff --git a/airtime_mvc/public/css/img/loading.gif b/airtime_mvc/public/css/img/loading.gif
new file mode 100644
index 000000000..aed0ea41f
Binary files /dev/null and b/airtime_mvc/public/css/img/loading.gif differ
diff --git a/airtime_mvc/public/css/img/unknown.png b/airtime_mvc/public/css/img/unknown.png
new file mode 100644
index 000000000..9de15bf90
Binary files /dev/null and b/airtime_mvc/public/css/img/unknown.png differ
diff --git a/airtime_mvc/public/js/airtime/preferences/preferences.js b/airtime_mvc/public/js/airtime/preferences/preferences.js
index a6fa7448e..f3171e07f 100644
--- a/airtime_mvc/public/js/airtime/preferences/preferences.js
+++ b/airtime_mvc/public/js/airtime/preferences/preferences.js
@@ -1,3 +1,55 @@
+function setWatchedDirEvents() {
+ $('#watchedFolder-selection').serverBrowser({
+ onSelect: function(path) {
+ $('#watchedFolder').val(path);
+ },
+ onLoad: function() {
+ return $('#watchedFolder').val();
+ },
+ width: 500,
+ height: 250,
+ position: ['center', 'center'],
+ //knownPaths: [{text:'Desktop', image:'desktop.png', path:'/home'}],
+ knownPaths: [],
+ imageUrl: 'img/icons/',
+ systemImageUrl: 'img/browser/',
+ handlerUrl: '/Preference/server-browse/format/json',
+ title: 'Choose Folder to Watch',
+ basePath: '/home',
+ requestMethod: 'POST',
+ });
+
+ $('#watchedFolder-ok').click(function(){
+ var url, chosen;
+
+ url = "/Preference/reload-watch-directory";
+ chosen = $('#watchedFolder').val();
+
+ $.post(url,
+ {format: "json", dir: chosen},
+
+ function(json) {
+ $("#watched-folder-section").empty();
+ $("#watched-folder-section").append(json.subform);
+ setWatchedDirEvents();
+ });
+ });
+
+ $('#watchedFolder-table').find('.ui-icon-close').click(function(){
+ var row = $(this).parent();
+ var folder = $(this).prev().text();
+
+ url = "/Preference/remove-watch-directory";
+
+ $.post(url,
+ {format: "json", dir: folder},
+
+ function(json) {
+ row.remove();
+ });
+ });
+}
+
$(document).ready(function() {
var form = $("form");
@@ -13,5 +65,7 @@ $(document).ready(function() {
h3.addClass("close");
}
});
+
+ setWatchedDirEvents();
});
diff --git a/airtime_mvc/public/js/serverbrowse/serverbrowser.js b/airtime_mvc/public/js/serverbrowse/serverbrowser.js
new file mode 100644
index 000000000..a86d3f606
--- /dev/null
+++ b/airtime_mvc/public/js/serverbrowse/serverbrowser.js
@@ -0,0 +1,370 @@
+/*
+ author: ApmeM (artem.votincev@gmail.com)
+ date: 9-June-2010
+ version: 1.4
+ download: http://code.google.com/p/jq-serverbrowse/
+*/
+
+(function($) {
+ $.fn.serverBrowser = function(settings) {
+ this.each(function() {
+
+ var config = {
+// Event function
+// Appear when user click 'Ok' button, or doubleclick on file
+ onSelect: function(file) {
+ alert('You select: ' + file);
+ },
+ onLoad: function() {
+ return config.basePath;
+ },
+ multiselect: false,
+// Image parameters
+// System images (loading.gif, unknown.png, folder.png and images from knownPaths) will be referenced to systemImageUrl
+// if systemImageUrl is empty or not specified - imageUrl will be taken
+// All other images (like images for extension) will be taken from imageUrl
+ imageUrl: 'img/',
+ systemImageUrl: '',
+ showUpInList: false,
+// Path properties
+// Base path, that links should start from.
+// If opened path is not under this path, alert will be shown and nothing will be opened
+// Path separator, that will be used to split specified paths and join paths to a string
+ basePath: 'C:',
+ separatorPath: '/',
+// Paths, that will be displayed on the left side of the dialog
+// This is a link to specified paths on the server
+ useKnownPaths: true,
+ knownPaths: [{text:'Desktop', image:'desktop.png', path:'C:/Users/All Users/Desktop'},
+ {text:'Documents', image:'documents.png', path:'C:/Users/All Users/Documents'}],
+// Images for known extension (like 'png', 'exe', 'zip'), that will be displayed with its real names
+// Images, that is not in this list will be referenced to 'unknown.png' image
+// If list is empty - all images is known.
+ knownExt: [],
+// Server path to this plugin handler
+ handlerUrl: 'browserDlg.txt',
+// JQuery-ui dialog settings
+ title: 'Browse',
+ width: 300,
+ height: 300,
+ position: ['center', 'top'],
+
+// Administrative parameters used to
+// help programmer or system administrator
+ requestMethod: 'POST',
+ };
+
+ if (settings) $.extend(config, settings);
+// Required configuration elements
+// We need to set some configuration elements without user
+// For example there should be 2 buttons on the bottom,
+// And dialog should be opened after button is pressed, not when it created
+// Also we need to know about dialog resizing
+ $.extend(config, {
+ autoOpen: false,
+ modal: true,
+ buttons: {
+ "Cancel": function() {
+ browserDlg.dialog("close");
+ },
+ "Open": function() {
+ doneOk();
+ },
+ },
+ resize: function(event, ui) {
+ recalculateSize(event, ui);
+ },
+ });
+
+ function systemImageUrl()
+ {
+ if (config.systemImageUrl.length == 0) {
+ return config.imageUrl;
+ } else{
+ return config.systemImageUrl;
+ }
+ }
+
+ var privateConfig = {
+// This stack array will store history navigation data
+// When user open new directory, old directory will be added to this list
+// If user want, he will be able to move back by this history
+ browserHistory: [],
+
+// This array contains all currently selected items
+// When user select element, it will add associated path into this array
+// When user deselect element - associated path will be removed
+// Exception: if 'config.multiselect' is false, only one element will be stored in this array.
+ selectedItems: [],
+ }
+
+// Main dialog div
+// It will be converted into jQuery-ui dialog box using my configuration parameters
+// It contains 3 divs
+ var browserDlg = $('
').css({'overflow': 'hidden'}).appendTo(document.body);
+ browserDlg.dialog(config);
+
+// First div on the top
+// It contains textbox field and buttons
+// User can enter any paths he want to open in this textbox and press enter
+// There is 3 buttons on the panel:
+ var enterPathDiv = $('
').addClass('ui-widget-content').appendTo(browserDlg).css({'height': '30px', 'width': '100%', 'padding-top': '7px'});
+
+ var enterButton = $('
').css({'float': 'left', 'vertical-align': 'middle', 'margin-left': '6px'}).addClass('ui-corner-all').hover(
+ function() { $(this).addClass('ui-state-hover'); },
+ function() { $(this).removeClass('ui-state-hover'); }
+ );
+
+ var enterLabel = $(' ').text('Look in: ').appendTo(enterButton.clone(false).appendTo(enterPathDiv));
+
+ var enterText = $(' ').keypress(function(e) {
+ if (e.keyCode == '13') {
+ e.preventDefault();
+ loadPath(enterText.val());
+ }
+ }).appendTo(enterButton.clone(false).appendTo(enterPathDiv));
+
+
+// Back button.
+// When user click on it, 2 last elements of the history pop from the list, and reload second of them.
+ var enterBack = $('
').addClass('ui-corner-all ui-icon ui-icon-circle-arrow-w').click(function(){
+ privateConfig.browserHistory.pop(); // Remove current element. It is not required now.
+ var backPath = config.basePath;
+ if(privateConfig.browserHistory.length > 0){
+ backPath = privateConfig.browserHistory.pop();
+ }
+ loadPath(backPath);
+ }).appendTo(enterButton.clone(true).appendTo(enterPathDiv));
+
+// Level Up Button
+// When user click on it, last element of the history will be taken, and '..' will be applied to the end of the array.
+ var enterUp = $('
').addClass('ui-corner-all ui-icon ui-icon-arrowreturnthick-1-n').click(function(){
+ backPath = privateConfig.browserHistory[privateConfig.browserHistory.length - 1];
+ if(backPath != config.basePath){
+ loadPath(backPath + config.separatorPath + '..');
+ }
+ }).appendTo(enterButton.clone(true).appendTo(enterPathDiv));
+
+// Second div is on the left
+// It contains images and texts for pre-defined paths
+// User just click on them and it will open pre-defined path
+ var knownPathDiv = $('
').addClass('ui-widget-content').css({'text-align':'center', 'overflow': 'auto', 'float': 'left', 'width': '100px'});
+ if(config.useKnownPaths){
+ knownPathDiv.appendTo(browserDlg);
+ $.each(config.knownPaths, function(index, path) {
+ var knownDiv = $('
').css({'margin':'10px'}).hover(
+ function() { $(this).addClass('ui-state-hover'); },
+ function() { $(this).removeClass('ui-state-hover'); }
+ ).click(function() {
+ loadPath(path.path);
+ }).appendTo(knownPathDiv);
+
+ $(' ').attr({ src: systemImageUrl() + config.separatorPath + path.image }).css({ width: '32px', margin: '5px 10px 5px 5px' }).appendTo(knownDiv);
+ $(' ').appendTo(knownDiv);
+ $(' ').text(path.text).appendTo(knownDiv);
+ });
+ }
+
+// Third div is everywhere :)
+// It show files and folders in the current path
+// User can click on path to select or deselect it
+// Doubleclick on path will open it
+// Also doubleclick on file will select this file and close dialog
+ var browserPathDiv = $('
').addClass('ui-widget-content').css({'float': 'right', 'overflow': 'auto'}).appendTo(browserDlg);
+
+// Now everything is done
+// When user will be ready - he just click on the area you select for this plugin and dialog will appear
+ $(this).click(function() {
+ privateConfig.browserHistory = [];
+ var startpath = removeBackPath(config.onLoad());
+
+ startpath = startpath.split(config.separatorPath);
+ startpath.pop();
+ startpath = startpath.join(config.separatorPath);
+
+ if(!checkBasePath(startpath)){
+ startpath = config.basePath;
+ }
+ loadPath(startpath);
+ browserDlg.dialog('open');
+ recalculateSize();
+ });
+
+// Function check if specified path is a child path of a 'config.basePath'
+// If it is not - user should see message, that path invalid, or path should be changed to valid.
+ function checkBasePath(path){
+ if(config.basePath == '')
+ return true;
+ var confPath = config.basePath.split(config.separatorPath);
+ var curPath = path.split(config.separatorPath);
+ if(confPath.length > curPath.length)
+ return false;
+ var result = true;
+ $.each(confPath, function(index, partConfPath) {
+ if(partConfPath != curPath[index]){
+ result = false;
+ }
+ });
+ return result;
+ }
+
+// Function remove '..' parts of the path
+// Process depend on config.separatorPath option
+// On the server side you need to check / or \ separators
+ function removeBackPath(path){
+ var confPath = config.basePath.split(config.separatorPath);
+ var curPath = path.split(config.separatorPath);
+ var newcurPath = [];
+ $.each(curPath, function(index, partCurPath) {
+ if(partCurPath == ".."){
+ newcurPath.pop();
+ }else{
+ newcurPath.push(partCurPath);
+ }
+ });
+ return newcurPath.join(config.separatorPath);
+ }
+
+// This function will be called when user click 'Open'
+// It check if any path is selected, and call config.onSelect function with path list
+ function doneOk(){
+ var newCurPath = [];
+ $.each(privateConfig.selectedItems, function(index, item) {
+ newCurPath.push($.data(item, 'path'));
+ });
+ if(newCurPath.length == 0) {
+ newCurPath.push(privateConfig.browserHistory.pop());
+ }
+
+ if(config.multiselect)
+ config.onSelect(newCurPath);
+ else {
+ if(newCurPath.length == 1) {
+ config.onSelect(newCurPath[0]);
+ } else if(newCurPath.length > 1){
+ alert('Plugin work incorrectly. If error repeat, please add issue into http://code.google.com/p/jq-serverbrowse/issues/list with steps to reproduce.');
+ return;
+ }
+ }
+ browserDlg.dialog("close");
+ }
+
+// Function recalculate and set new width and height for left and right div elements
+// height have '-2' because of the borders
+// width have '-4' because of a border an 2 pixels space between divs
+ function recalculateSize(event, ui){
+ knownPathDiv.css({'height' : browserDlg.height() - enterPathDiv.outerHeight(true) - 2});
+ browserPathDiv.css({'height' : browserDlg.height() - enterPathDiv.outerHeight(true) - 2,
+ 'width' : browserDlg.width() - knownPathDiv.outerWidth(true) - 4});
+ }
+
+// Function adds new element into browserPathDiv element depends on file parameters
+// If file.isError is set, error message will be displayed instead of clickable area
+// Clickable div contain image from extension and text from file parameter
+ function addElement(file){
+ var itemDiv = $('
').css({ margin: '2px' }).appendTo(browserPathDiv);
+ if(file.isError)
+ {
+ itemDiv.addClass('ui-state-error ui-corner-all').css({padding: '0pt 0.7em'});
+ var p = $('
').appendTo(itemDiv);
+ $(' ').addClass('ui-icon ui-icon-alert').css({'float': 'left', 'margin-right': '0.3em'}).appendTo(p);
+ $(' ').text(file.name).appendTo(p);
+ }else
+ {
+ var fullPath = file.path + config.separatorPath + file.name;
+ itemDiv.hover(
+ function() { $(this).addClass('ui-state-hover'); },
+ function() { $(this).removeClass('ui-state-hover'); }
+ );
+ var itemImage = $(' ').css({ width: '16px', margin: '0 5px 0 0' }).appendTo(itemDiv);
+ var itemText = $(' ').text(file.name).appendTo(itemDiv);
+ if (file.isFolder)
+ itemImage.attr({ src: systemImageUrl() + 'folder.png' });
+ else {
+ ext = file.name.split('.').pop();
+ var res = '';
+ if (ext == '' || ext == file.name || (config.knownExt.length > 0 && $.inArray(ext, config.knownExt) < 0))
+ itemImage.attr({ src: systemImageUrl() + 'unknown.png' });
+ else
+ itemImage.attr({ src: config.imageUrl + ext + '.png' });
+ }
+ $.data(itemDiv, 'path', fullPath);
+ itemDiv.unbind('click').bind('click', function(e) {
+ if(!$(this).hasClass('ui-state-active')) {
+ if(!config.multiselect && privateConfig.selectedItems.length > 0) {
+ $(privateConfig.selectedItems[0]).click();
+ }
+ privateConfig.selectedItems.push(itemDiv);
+ }else{
+ var newCurPath = [];
+ $.each(privateConfig.selectedItems, function(index, item) {
+ if($.data(item, 'path') != fullPath)
+ newCurPath.push(item);
+ });
+ privateConfig.selectedItems = newCurPath;
+ }
+ $(this).toggleClass('ui-state-active');
+ });
+
+ itemDiv.unbind('dblclick').bind('dblclick', function(e) {
+ if (file.isFolder){
+ loadPath(fullPath);
+ } else {
+ privateConfig.selectedItems = [itemDiv];
+ doneOk();
+ }
+ });
+ }
+ }
+
+// Main plugin function
+// When user enter path manually, select it from pre-defined path, or doubleclick in browser this function will call
+// It send a request on the server to retrieve child directories and files of the specified path
+// If path is not under 'config.basePath', alert will be shown and nothing will be opened
+ function loadPath(path) {
+ privateConfig.selectedItems = [];
+
+ // First we need to remove all '..' parts of the path
+ path = removeBackPath(path);
+
+ // Then we need to check, if path based on 'config.basePath'
+ if(!checkBasePath(path)) {
+ alert('Path should be based from ' + config.basePath);
+ return;
+ }
+
+ // Then we can put this path into history
+ privateConfig.browserHistory.push(path);
+
+ // Show it to user
+ enterText.val(path);
+
+ // And load
+ $.ajax({
+ url: config.handlerUrl,
+ type: config.requestMethod,
+ data: {
+ action: 'browse',
+ path: path,
+ time: new Date().getTime()
+ },
+ beforeSend: function() {
+ browserPathDiv.empty().css({ 'text-align': 'center' });
+ $(' ').attr({ src: systemImageUrl() + 'loading.gif' }).css({ width: '32px' }).appendTo(browserPathDiv);
+ },
+ success: function(files) {
+ browserPathDiv.empty().css({ 'text-align': 'left' });
+ if(path != config.basePath && config.showUpInList){
+ addElement({name: '..', isFolder: true, isError: false, path: path});
+ }
+ $.each(files, function(index, file) {
+ addElement($.extend(file, {path: path}));
+ });
+ },
+ dataType: 'json'
+ });
+ }
+ });
+ return this;
+ };
+})(jQuery);
diff --git a/install/include/AirtimeInstall.php b/install/include/AirtimeInstall.php
index dbbff57b6..418b24f80 100644
--- a/install/include/AirtimeInstall.php
+++ b/install/include/AirtimeInstall.php
@@ -149,6 +149,15 @@ class AirtimeInstall
$success = chmod($rp, 02777);
$CC_CONFIG['storageDir'] = $rp;
+ AirtimeInstall::DbConnect(true);
+ //add stor directory to MusiDirs
+ $sql = "INSERT INTO cc_music_dirs (directory, type) VALUES ('$rp', 'stor')";
+ $result = $CC_DBC->query($sql);
+ if (PEAR::isError($result)) {
+ echo "* Failed inserting {$rp} in cc_music_dirs".PHP_EOL;
+ echo "* Message {$result->getMessage()}".PHP_EOL;
+ exit(1);
+ }
}
public static function CreateDatabaseUser()
@@ -225,6 +234,7 @@ class AirtimeInstall
echo "* Creating database tables".PHP_EOL;
// Put Propel sql files in Database
+ //$command = AirtimeInstall::CONF_DIR_WWW."/library/propel/generator/bin/propel-gen ".AirtimeInstall::CONF_DIR_WWW."/build/ insert-sql";
$command = AirtimeInstall::CONF_DIR_WWW."/library/propel/generator/bin/propel-gen ".AirtimeInstall::CONF_DIR_WWW."/build/ insert-sql 2>/dev/null";
@exec($command, $output, $results);
}
diff --git a/python_apps/media-monitor/MediaMonitor.py b/python_apps/media-monitor/MediaMonitor.py
index d30091772..a00ab89fa 100644
--- a/python_apps/media-monitor/MediaMonitor.py
+++ b/python_apps/media-monitor/MediaMonitor.py
@@ -203,6 +203,7 @@ class AirtimeNotifier(Notifier):
self.md_manager = MetadataExtractor()
self.import_processes = {}
self.watched_folders = []
+ self.watches_to_remove = []
def handle_message(self, body, message):
# ACK the message to take it off the queue
@@ -222,6 +223,9 @@ class AirtimeNotifier(Notifier):
self.import_processes[m['directory']] = p
#add this new folder to our list of watched folders
self.watched_folders.append(m['directory'])
+ elif m['event_type'] == "remove_watch":
+ self.watches_to_remove.append(m['directory'])
+
def update_airtime(self, d):
@@ -444,9 +448,13 @@ class MediaMonitor(ProcessEvent):
#this file is new, md5 does not exist in Airtime.
if(response['airtime_status'] == 0):
- filepath = self.create_file_path(event.pathname)
- self.move_file(event.pathname, filepath)
- self.file_events.append({'mode': MODE_CREATE, 'filepath': filepath})
+ global storage_directory
+ if self.is_parent_directory(event.pathname, storage_directory):
+ filepath = self.create_file_path(event.pathname)
+ self.move_file(event.pathname, filepath)
+ self.file_events.append({'mode': MODE_CREATE, 'filepath': filepath})
+ else:
+ self.file_events.append({'mode': MODE_CREATE, 'filepath': event.pathname})
else:
self.set_needed_file_permissions(event.pathname, event.dir)
@@ -495,9 +503,13 @@ class MediaMonitor(ProcessEvent):
else:
#TODO need to pass in if md5 exists to this file creation function, identical files will just replace current files not have a (1) etc.
#file has been most likely dropped into stor folder from an unwatched location. (from gui, mv command not cp)
- md_filepath = self.create_file_path(event.pathname)
- self.move_file(event.pathname, md_filepath)
- self.file_events.append({'mode': MODE_CREATE, 'filepath': md_filepath})
+ global storage_directory
+ if self.is_parent_directory(event.pathname, storage_directory):
+ md_filepath = self.create_file_path(event.pathname)
+ self.move_file(event.pathname, md_filepath)
+ self.file_events.append({'mode': MODE_CREATE, 'filepath': md_filepath})
+ else:
+ self.file_events.append({'mode': MODE_CREATE, 'filepath': event.pathname})
def process_IN_DELETE(self, event):
if not event.dir:
@@ -509,6 +521,15 @@ class MediaMonitor(ProcessEvent):
def notifier_loop_callback(self, notifier):
+ #recursively unwatch any directories.
+ for watched_directory in notifier.watches_to_remove:
+ wd = self.wm.get_wd(watched_directory)
+ self.logger.info("Removing watch on: %s wdd %s", watched_directory, wd)
+ self.wm.rm_watch(wd, rec=True)
+
+ notifier.watches_to_remove = []
+
+
for watched_directory in notifier.import_processes.keys():
process = notifier.import_processes[watched_directory]
if not process.is_alive():