CC-2977: Never delete files from the database
- using mtab(previous and current) files to figure out directories to be added or removed - adding index to cc_files - see the tickets and media monitor design page for more info
This commit is contained in:
parent
d5d4d50a9e
commit
08a09e4096
|
@ -574,13 +574,13 @@ class ApiController extends Zend_Controller_Action
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// path already exist
|
// path already exist
|
||||||
if($file->getFileExistFlag()){
|
if($file->getFileExistsFlag()){
|
||||||
// file marked as exists
|
// file marked as exists
|
||||||
$this->view->error = "File already exists in Airtime.";
|
$this->view->error = "File already exists in Airtime.";
|
||||||
return;
|
return;
|
||||||
}else{
|
}else{
|
||||||
// file marked as not exists
|
// file marked as not exists
|
||||||
$file->setFileExistFlag(true);
|
$file->setFileExistsFlag(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -831,46 +831,70 @@ class ApiController extends Zend_Controller_Action
|
||||||
}
|
}
|
||||||
|
|
||||||
$params = $request->getParams();
|
$params = $request->getParams();
|
||||||
|
$added_list = empty($params['added_dir'])?array():explode(',',$params['added_dir']);
|
||||||
$temp_list = $params['mount_list'];
|
$removed_list = empty($params['removed_dir'])?array():explode(',',$params['removed_dir']);
|
||||||
$mount_list = explode(',',$temp_list);
|
|
||||||
|
|
||||||
// get all watched dirs
|
// get all watched dirs
|
||||||
$dirs = Application_Model_MusicDir::getWatchedDirs(null, null);
|
$watched_dirs = Application_Model_MusicDir::getWatchedDirs(null,null);
|
||||||
|
|
||||||
// dirs to be added to watch list again
|
foreach( $added_list as $ad){
|
||||||
$addedDirs = array();
|
foreach( $watched_dirs as $dir ){
|
||||||
// dirs to be deleted from watch list
|
$dirPath = $dir->getDirectory();
|
||||||
$removedDirs = array();
|
|
||||||
|
$ad .= '/';
|
||||||
$tempDirs = Application_Model_MusicDir::getWatchedDirs(true,null);
|
|
||||||
foreach( $tempDirs as $d)
|
// if mount path itself was watched
|
||||||
{
|
if($dirPath == $ad){
|
||||||
$removedDirs[$d->getDirectory()] = $d;
|
Application_Model_MusicDir::addWatchedDir($dirPath, false);
|
||||||
}
|
break;
|
||||||
foreach( $dirs as $dir){
|
}
|
||||||
// set Exsits as false as default
|
// if dir contains any dir in removed_list( if watched dir resides on new mounted path )
|
||||||
foreach($mount_list as $mount_path){
|
else if(substr($dirPath, 0, strlen($ad)) === $ad && $dir->getExistsFlag() == false){
|
||||||
if($mount_path == '/'){
|
Application_Model_MusicDir::addWatchedDir($dirPath, false);
|
||||||
continue;
|
break;
|
||||||
}
|
}
|
||||||
// if dir contaions mount_path
|
// is new mount point within the watched dir?
|
||||||
if(strstr($dir->getDirectory(),$mount_path)){
|
// pyinotify doesn't notify anyhing in this case, so we add this mount point as
|
||||||
if($dir->getExistsFlag() == false){
|
// watched dir
|
||||||
$addedDirs[] = $dir;
|
else if(substr($ad, 0, strlen($dirPath)) === $dirPath){
|
||||||
}else{
|
// bypass nested loop check
|
||||||
unset($removedDirs[$dir->getDirector()]);
|
Application_Model_MusicDir::addWatchedDir($ad, false, true);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
foreach( $removed_list as $rd){
|
||||||
|
foreach( $watched_dirs as $dir ){
|
||||||
foreach($addedDirs as $ad){
|
$dirPath = $dir->getDirectory();
|
||||||
Application_Model_MusicDir::addWatchedDir($ad->getDirectory(), false);
|
$rd .= '/';
|
||||||
}
|
// if dir contains any dir in removed_list( if watched dir resides on new mounted path )
|
||||||
foreach($removedDirs as $rd){
|
if(substr($dirPath, 0, strlen($rd)) === $rd && $dir->getExistsFlag() == true){
|
||||||
Application_Model_MusicDir::removeWatchedDir($rd->getDirectory(), false);
|
Application_Model_MusicDir::removeWatchedDir($dirPath, false);
|
||||||
}
|
break;
|
||||||
|
}
|
||||||
|
// is new mount point within the watched dir?
|
||||||
|
// pyinotify doesn't notify anyhing in this case, so we walk through all files within
|
||||||
|
// this watched dir in DB and mark them deleted.
|
||||||
|
// In case of h) of use cases, due to pyinotify behaviour of noticing mounted dir, we need to
|
||||||
|
// compare agaisnt all files in cc_files table
|
||||||
|
else if(substr($rd, 0, strlen($dirPath)) === $dirPath ){
|
||||||
|
$watchDir = Application_Model_MusicDir::getDirByPath($rd);
|
||||||
|
// get all the files that is under $dirPath
|
||||||
|
$files = Application_Model_StoredFile::listAllFiles($dir->getId(), true);
|
||||||
|
foreach($files as $f){
|
||||||
|
// if the file is from this mount
|
||||||
|
if(substr( $f->getFilePath(),0,strlen($rd) ) === $rd){
|
||||||
|
$f->delete();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if($watchDir){
|
||||||
|
Application_Model_MusicDir::removeWatchedDir($rd, false);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// handles case where watched dir is missing
|
// handles case where watched dir is missing
|
||||||
|
|
|
@ -226,7 +226,6 @@ class LibraryController extends Zend_Controller_Action
|
||||||
public function contentsAction()
|
public function contentsAction()
|
||||||
{
|
{
|
||||||
$post = $this->getRequest()->getPost();
|
$post = $this->getRequest()->getPost();
|
||||||
Logging::log(print_r($post, true));
|
|
||||||
$datatables = Application_Model_StoredFile::searchFilesForPlaylistBuilder($post);
|
$datatables = Application_Model_StoredFile::searchFilesForPlaylistBuilder($post);
|
||||||
|
|
||||||
//format clip lengh to 1 decimal
|
//format clip lengh to 1 decimal
|
||||||
|
|
|
@ -45,20 +45,30 @@ class Application_Model_MusicDir {
|
||||||
$this->_dir->save();
|
$this->_dir->save();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setRemovedFlag($flag){
|
public function setWatchedFlag($flag){
|
||||||
$this->_dir->setRemoved($flag);
|
$this->_dir->setWatched($flag);
|
||||||
$this->_dir->save();
|
$this->_dir->save();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getRemovedFlag(){
|
public function getWatchedFlag(){
|
||||||
return $this->_dir->getRemoved();
|
return $this->_dir->getWatched();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getExistsFlag(){
|
public function getExistsFlag(){
|
||||||
return $this->_dir->getExists();
|
return $this->_dir->getExists();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function remove($setRemovedFlag=true)
|
/** There are 2 cases where this function can be called.
|
||||||
|
* 1. When watched dir was removed
|
||||||
|
* 2. When some dir was watched, but it was unmounted
|
||||||
|
*
|
||||||
|
* In case of 1, $userAddedWatchedDir should be true
|
||||||
|
* In case of 2, $userAddedWatchedDir should be false
|
||||||
|
*
|
||||||
|
* When $userAddedWatchedDir is true, it will set "Watched" flag to false
|
||||||
|
* otherwise, it will set "Exists" flag to true
|
||||||
|
**/
|
||||||
|
public function remove($userAddedWatchedDir=true)
|
||||||
{
|
{
|
||||||
global $CC_DBC;
|
global $CC_DBC;
|
||||||
|
|
||||||
|
@ -77,13 +87,13 @@ class Application_Model_MusicDir {
|
||||||
foreach( $files as $file_row ){
|
foreach( $files as $file_row ){
|
||||||
$temp_file = Application_Model_StoredFile::Recall($file_row['id']);
|
$temp_file = Application_Model_StoredFile::Recall($file_row['id']);
|
||||||
if($temp_file != null){
|
if($temp_file != null){
|
||||||
$temp_file->setFileExistFlag(false);
|
$temp_file->setFileExistsFlag(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// set RemovedFlag to true
|
// set RemovedFlag to true
|
||||||
if($setRemovedFlag){
|
if($userAddedWatchedDir){
|
||||||
self::setRemovedFlag(true);
|
self::setWatchedFlag(false);
|
||||||
}else{
|
}else{
|
||||||
self::setExistsFlag(false);
|
self::setExistsFlag(false);
|
||||||
}
|
}
|
||||||
|
@ -148,7 +158,19 @@ class Application_Model_MusicDir {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function addDir($p_path, $p_type, $setRemovedFlag=true)
|
/** There are 2 cases where this function can be called.
|
||||||
|
* 1. When watched dir was added
|
||||||
|
* 2. When some dir was watched, but it was unmounted somehow, but gets mounted again
|
||||||
|
*
|
||||||
|
* In case of 1, $userAddedWatchedDir should be true
|
||||||
|
* In case of 2, $userAddedWatchedDir should be false
|
||||||
|
*
|
||||||
|
* When $userAddedWatchedDir is true, it will set "Removed" flag to false
|
||||||
|
* otherwise, it will set "Exists" flag to true
|
||||||
|
*
|
||||||
|
* @param $nestedWatch - if true, bypass path check, and Watched to false
|
||||||
|
**/
|
||||||
|
public static function addDir($p_path, $p_type, $userAddedWatchedDir=true, $nestedWatch=false)
|
||||||
{
|
{
|
||||||
if(!is_dir($p_path)){
|
if(!is_dir($p_path)){
|
||||||
return array("code"=>2, "error"=>"'$p_path' is not a valid directory.");
|
return array("code"=>2, "error"=>"'$p_path' is not a valid directory.");
|
||||||
|
@ -174,10 +196,15 @@ class Application_Model_MusicDir {
|
||||||
try {
|
try {
|
||||||
/* isPathValid() checks if path is a substring or a superstring of an
|
/* isPathValid() checks if path is a substring or a superstring of an
|
||||||
* existing dir and if not, throws NestedDirectoryException */
|
* existing dir and if not, throws NestedDirectoryException */
|
||||||
self::isPathValid($p_path);
|
if(!$nestedWatch){
|
||||||
if($setRemovedFlag){
|
self::isPathValid($p_path);
|
||||||
$dir->setRemovedFlag(false);
|
}
|
||||||
|
if($userAddedWatchedDir){
|
||||||
|
$dir->setWatchedFlag(true);
|
||||||
}else{
|
}else{
|
||||||
|
if($nestedWatch){
|
||||||
|
$dir->setWatchedFlag(false);
|
||||||
|
}
|
||||||
$dir->setExistsFlag(true);
|
$dir->setExistsFlag(true);
|
||||||
}
|
}
|
||||||
$dir->setDirectory($p_path);
|
$dir->setDirectory($p_path);
|
||||||
|
@ -196,15 +223,15 @@ class Application_Model_MusicDir {
|
||||||
* 1. When watched dir was added
|
* 1. When watched dir was added
|
||||||
* 2. When some dir was watched, but it was unmounted somehow, but gets mounted again
|
* 2. When some dir was watched, but it was unmounted somehow, but gets mounted again
|
||||||
*
|
*
|
||||||
* In case of 1, $setRemovedFlag should be true
|
* In case of 1, $userAddedWatchedDir should be true
|
||||||
* In case of 2, $setRemovedFlag should be false
|
* In case of 2, $userAddedWatchedDir should be false
|
||||||
*
|
*
|
||||||
* When $setRemovedFlag is true, it will set "Removed" flag to false
|
* When $userAddedWatchedDir is true, it will set "Watched" flag to true
|
||||||
* otherwise, it will set "Exists" flag to true
|
* otherwise, it will set "Exists" flag to true
|
||||||
**/
|
**/
|
||||||
public static function addWatchedDir($p_path, $setRemovedFlag=true)
|
public static function addWatchedDir($p_path, $userAddedWatchedDir=true, $nestedWatch=false)
|
||||||
{
|
{
|
||||||
$res = self::addDir($p_path, "watched", $setRemovedFlag);
|
$res = self::addDir($p_path, "watched", $userAddedWatchedDir, $nestedWatch);
|
||||||
|
|
||||||
if ($res['code'] == 0){
|
if ($res['code'] == 0){
|
||||||
|
|
||||||
|
@ -266,7 +293,6 @@ class Application_Model_MusicDir {
|
||||||
$dir = CcMusicDirsQuery::create()
|
$dir = CcMusicDirsQuery::create()
|
||||||
->filterByDirectory($p_path)
|
->filterByDirectory($p_path)
|
||||||
->findOne();
|
->findOne();
|
||||||
|
|
||||||
if($dir == NULL){
|
if($dir == NULL){
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -280,9 +306,9 @@ class Application_Model_MusicDir {
|
||||||
* Search and returns watched dirs
|
* Search and returns watched dirs
|
||||||
*
|
*
|
||||||
* @param $exists search condition with exists flag
|
* @param $exists search condition with exists flag
|
||||||
* @param $removed search condition with removed flag
|
* @param $watched search condition with watched flag
|
||||||
*/
|
*/
|
||||||
public static function getWatchedDirs($exists=true, $removed=false)
|
public static function getWatchedDirs($exists=true, $watched=true)
|
||||||
{
|
{
|
||||||
$result = array();
|
$result = array();
|
||||||
|
|
||||||
|
@ -291,8 +317,8 @@ class Application_Model_MusicDir {
|
||||||
if($exists !== null){
|
if($exists !== null){
|
||||||
$dirs = $dirs->filterByExists($exists);
|
$dirs = $dirs->filterByExists($exists);
|
||||||
}
|
}
|
||||||
if($removed !== null){
|
if($watched !== null){
|
||||||
$dirs = $dirs->filterByRemoved($removed);
|
$dirs = $dirs->filterByWatched($watched);
|
||||||
}
|
}
|
||||||
$dirs = $dirs->find();
|
$dirs = $dirs->find();
|
||||||
|
|
||||||
|
@ -359,23 +385,22 @@ class Application_Model_MusicDir {
|
||||||
* 1. When watched dir was removed
|
* 1. When watched dir was removed
|
||||||
* 2. When some dir was watched, but it was unmounted
|
* 2. When some dir was watched, but it was unmounted
|
||||||
*
|
*
|
||||||
* In case of 1, $setRemovedFlag should be true
|
* In case of 1, $userAddedWatchedDir should be true
|
||||||
* In case of 2, $setRemovedFlag should be false
|
* In case of 2, $userAddedWatchedDir should be false
|
||||||
*
|
*
|
||||||
* When $setRemovedFlag is true, it will set "Removed" flag to false
|
* When $userAddedWatchedDir is true, it will set "Watched" flag to false
|
||||||
* otherwise, it will set "Exists" flag to true
|
* otherwise, it will set "Exists" flag to true
|
||||||
**/
|
**/
|
||||||
public static function removeWatchedDir($p_dir, $setRemovedFlag=true){
|
public static function removeWatchedDir($p_dir, $userAddedWatchedDir=true){
|
||||||
$real_path = realpath($p_dir)."/";
|
$real_path = realpath($p_dir)."/";
|
||||||
if($real_path != "/"){
|
if($real_path != "/"){
|
||||||
$p_dir = $real_path;
|
$p_dir = $real_path;
|
||||||
}
|
}
|
||||||
$dir = Application_Model_MusicDir::getDirByPath($p_dir);
|
$dir = Application_Model_MusicDir::getDirByPath($p_dir);
|
||||||
|
|
||||||
if($dir == NULL){
|
if($dir == NULL){
|
||||||
return array("code"=>1,"error"=>"'$p_dir' doesn't exist in the watched list.");
|
return array("code"=>1,"error"=>"'$p_dir' doesn't exist in the watched list.");
|
||||||
}else{
|
}else{
|
||||||
$dir->remove($setRemovedFlag);
|
$dir->remove($userAddedWatchedDir);
|
||||||
$data = array();
|
$data = array();
|
||||||
$data["directory"] = $p_dir;
|
$data["directory"] = $p_dir;
|
||||||
Application_Model_RabbitMq::SendMessageToMediaMonitor("remove_watch", $data);
|
Application_Model_RabbitMq::SendMessageToMediaMonitor("remove_watch", $data);
|
||||||
|
|
|
@ -317,8 +317,8 @@ class Application_Model_StoredFile {
|
||||||
// don't delete from the playslist. We might want to put a flag
|
// don't delete from the playslist. We might want to put a flag
|
||||||
//Application_Model_Playlist::DeleteFileFromAllPlaylists($this->getId());
|
//Application_Model_Playlist::DeleteFileFromAllPlaylists($this->getId());
|
||||||
|
|
||||||
// set file_exist falg to false
|
// set file_exists falg to false
|
||||||
$this->_file->setDbFileExist(false);
|
$this->_file->setDbFileExists(false);
|
||||||
$this->_file->save();
|
$this->_file->save();
|
||||||
//$this->_file->delete();
|
//$this->_file->delete();
|
||||||
|
|
||||||
|
@ -683,7 +683,7 @@ class Application_Model_StoredFile {
|
||||||
FROM ".$CC_CONFIG["playListTable"]." AS PL
|
FROM ".$CC_CONFIG["playListTable"]." AS PL
|
||||||
LEFT JOIN ".$CC_CONFIG['playListTimeView']." AS PLT USING(id))
|
LEFT JOIN ".$CC_CONFIG['playListTimeView']." AS PLT USING(id))
|
||||||
UNION
|
UNION
|
||||||
(".$fileSelect."id FROM ".$CC_CONFIG["filesTable"]." AS FILES WHERE file_exist = 'TRUE')) AS RESULTS";
|
(".$fileSelect."id FROM ".$CC_CONFIG["filesTable"]." AS FILES WHERE file_exists = 'TRUE')) AS RESULTS";
|
||||||
|
|
||||||
return Application_Model_StoredFile::searchFiles($fromTable, $datatables);
|
return Application_Model_StoredFile::searchFiles($fromTable, $datatables);
|
||||||
}
|
}
|
||||||
|
@ -754,9 +754,6 @@ class Application_Model_StoredFile {
|
||||||
$orderby = join("," , $orderby);
|
$orderby = join("," , $orderby);
|
||||||
// End Order By clause
|
// End Order By clause
|
||||||
|
|
||||||
//ordered by integer as expected by datatables.
|
|
||||||
//$CC_DBC->setFetchMode(DB_FETCHMODE_ORDERED);
|
|
||||||
|
|
||||||
if(isset($where)) {
|
if(isset($where)) {
|
||||||
$where = join(" AND ", $where);
|
$where = join(" AND ", $where);
|
||||||
$sql = $selectorCount." FROM ".$fromTable." WHERE ".$where;
|
$sql = $selectorCount." FROM ".$fromTable." WHERE ".$where;
|
||||||
|
@ -770,21 +767,13 @@ class Application_Model_StoredFile {
|
||||||
$results = $CC_DBC->getAll($sql);
|
$results = $CC_DBC->getAll($sql);
|
||||||
foreach($results as &$row){
|
foreach($results as &$row){
|
||||||
// add checkbox row
|
// add checkbox row
|
||||||
$row['checkbox'] = "<input type='checkbox' name='cb_".$row[id]."'>";
|
$row['checkbox'] = "<input type='checkbox' name='cb_".$row['id']."'>";
|
||||||
|
|
||||||
// a full timestamp is being returned for playlists' year column;
|
// a full timestamp is being returned for playlists' year column;
|
||||||
// split it and grab only the year info
|
// split it and grab only the year info
|
||||||
$yearSplit = explode('-', $row['year']);
|
$yearSplit = explode('-', $row['year']);
|
||||||
$row['year'] = $yearSplit[0];
|
$row['year'] = $yearSplit[0];
|
||||||
}
|
}
|
||||||
//$results['checkbox']
|
|
||||||
//$results = $CC_DBC->getAssoc($sql);
|
|
||||||
Logging::log(print_r($results, true));
|
|
||||||
//echo $results;
|
|
||||||
//echo $sql;
|
|
||||||
|
|
||||||
//put back to default fetch mode.
|
|
||||||
$CC_DBC->setFetchMode(DB_FETCHMODE_ASSOC);
|
|
||||||
|
|
||||||
if(!isset($totalDisplayRows)) {
|
if(!isset($totalDisplayRows)) {
|
||||||
$totalDisplayRows = $totalRows;
|
$totalDisplayRows = $totalRows;
|
||||||
|
@ -929,24 +918,34 @@ class Application_Model_StoredFile {
|
||||||
return $CC_DBC->GetOne($sql);
|
return $CC_DBC->GetOne($sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function listAllFiles($dir_id){
|
/**
|
||||||
|
*
|
||||||
|
* Enter description here ...
|
||||||
|
* @param $dir_id - if this is not provided, it returns all files with full path constructed.
|
||||||
|
* @param $propelObj - if this is true, it returns array of proepl obj
|
||||||
|
*/
|
||||||
|
public static function listAllFiles($dir_id=null, $propelObj=false){
|
||||||
global $CC_DBC;
|
global $CC_DBC;
|
||||||
|
|
||||||
// $sql = "SELECT m.directory || '/' || f.filepath as fp"
|
if($propelObj){
|
||||||
// ." FROM CC_MUSIC_DIRS m"
|
$sql = "SELECT m.directory || f.filepath as fp"
|
||||||
// ." LEFT JOIN CC_FILES f"
|
." FROM CC_MUSIC_DIRS m"
|
||||||
// ." ON m.id = f.directory"
|
." LEFT JOIN CC_FILES f"
|
||||||
// ." WHERE m.id = f.directory"
|
." ON m.id = f.directory WHERE m.id = $dir_id and f.file_exists = 'TRUE'";
|
||||||
// ." AND m.id = $dir_id";
|
}else{
|
||||||
$sql = "SELECT filepath as fp"
|
$sql = "SELECT filepath as fp"
|
||||||
." FROM CC_FILES"
|
." FROM CC_FILES"
|
||||||
." WHERE directory = $dir_id";
|
." WHERE directory = $dir_id and file_exists = 'TRUE'";
|
||||||
|
}
|
||||||
$rows = $CC_DBC->getAll($sql);
|
$rows = $CC_DBC->getAll($sql);
|
||||||
|
|
||||||
$results = array();
|
$results = array();
|
||||||
foreach ($rows as $row){
|
foreach ($rows as $row){
|
||||||
$results[] = $row["fp"];
|
if($propelObj){
|
||||||
|
$results[] = Application_Model_StoredFile::RecallByFilepath($row["fp"]);
|
||||||
|
}else{
|
||||||
|
$results[] = $row["fp"];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $results;
|
return $results;
|
||||||
|
@ -990,13 +989,13 @@ class Application_Model_StoredFile {
|
||||||
return $this->_file->getDbSoundCloudErrorMsg();
|
return $this->_file->getDbSoundCloudErrorMsg();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setFileExistFlag($flag){
|
public function setFileExistsFlag($flag){
|
||||||
$this->_file->setDbFileExist($flag)
|
$this->_file->setDbFileExists($flag)
|
||||||
->save();
|
->save();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getFileExistFlag(){
|
public function getFileExistsFlag(){
|
||||||
return $this->_file->getDbFileExist();
|
return $this->_file->getDbFileExists();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function uploadToSoundCloud()
|
public function uploadToSoundCloud()
|
||||||
|
|
|
@ -95,7 +95,7 @@ class CcFilesTableMap extends TableMap {
|
||||||
$this->addColumn('SUBJECT', 'DbSubject', 'VARCHAR', false, 512, null);
|
$this->addColumn('SUBJECT', 'DbSubject', 'VARCHAR', false, 512, null);
|
||||||
$this->addColumn('CONTRIBUTOR', 'DbContributor', 'VARCHAR', false, 512, null);
|
$this->addColumn('CONTRIBUTOR', 'DbContributor', 'VARCHAR', false, 512, null);
|
||||||
$this->addColumn('LANGUAGE', 'DbLanguage', 'VARCHAR', false, 512, null);
|
$this->addColumn('LANGUAGE', 'DbLanguage', 'VARCHAR', false, 512, null);
|
||||||
$this->addColumn('FILE_EXIST', 'DbFileExist', 'BOOLEAN', false, null, true);
|
$this->addColumn('FILE_EXISTS', 'DbFileExists', 'BOOLEAN', false, null, true);
|
||||||
$this->addColumn('SOUNDCLOUD_ID', 'DbSoundcloudId', 'INTEGER', false, null, null);
|
$this->addColumn('SOUNDCLOUD_ID', 'DbSoundcloudId', 'INTEGER', false, null, null);
|
||||||
$this->addColumn('SOUNDCLOUD_ERROR_CODE', 'DbSoundcloudErrorCode', 'INTEGER', false, null, null);
|
$this->addColumn('SOUNDCLOUD_ERROR_CODE', 'DbSoundcloudErrorCode', 'INTEGER', false, null, null);
|
||||||
$this->addColumn('SOUNDCLOUD_ERROR_MSG', 'DbSoundcloudErrorMsg', 'VARCHAR', false, 512, null);
|
$this->addColumn('SOUNDCLOUD_ERROR_MSG', 'DbSoundcloudErrorMsg', 'VARCHAR', false, 512, null);
|
||||||
|
|
|
@ -42,7 +42,7 @@ class CcMusicDirsTableMap extends TableMap {
|
||||||
$this->addColumn('DIRECTORY', 'Directory', 'LONGVARCHAR', false, null, null);
|
$this->addColumn('DIRECTORY', 'Directory', 'LONGVARCHAR', false, null, null);
|
||||||
$this->addColumn('TYPE', 'Type', 'VARCHAR', false, 255, null);
|
$this->addColumn('TYPE', 'Type', 'VARCHAR', false, 255, null);
|
||||||
$this->addColumn('EXISTS', 'Exists', 'BOOLEAN', false, null, true);
|
$this->addColumn('EXISTS', 'Exists', 'BOOLEAN', false, null, true);
|
||||||
$this->addColumn('REMOVED', 'Removed', 'BOOLEAN', false, null, false);
|
$this->addColumn('WATCHED', 'Watched', 'BOOLEAN', false, null, true);
|
||||||
// validators
|
// validators
|
||||||
} // initialize()
|
} // initialize()
|
||||||
|
|
||||||
|
|
|
@ -373,11 +373,11 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
||||||
protected $language;
|
protected $language;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The value for the file_exist field.
|
* The value for the file_exists field.
|
||||||
* Note: this column has a database default value of: true
|
* Note: this column has a database default value of: true
|
||||||
* @var boolean
|
* @var boolean
|
||||||
*/
|
*/
|
||||||
protected $file_exist;
|
protected $file_exists;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The value for the soundcloud_id field.
|
* The value for the soundcloud_id field.
|
||||||
|
@ -456,7 +456,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
||||||
$this->filepath = '';
|
$this->filepath = '';
|
||||||
$this->state = 'empty';
|
$this->state = 'empty';
|
||||||
$this->currentlyaccessing = 0;
|
$this->currentlyaccessing = 0;
|
||||||
$this->file_exist = true;
|
$this->file_exists = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1132,13 +1132,13 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the [file_exist] column value.
|
* Get the [file_exists] column value.
|
||||||
*
|
*
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public function getDbFileExist()
|
public function getDbFileExists()
|
||||||
{
|
{
|
||||||
return $this->file_exist;
|
return $this->file_exists;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2446,24 +2446,24 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
||||||
} // setDbLanguage()
|
} // setDbLanguage()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the value of [file_exist] column.
|
* Set the value of [file_exists] column.
|
||||||
*
|
*
|
||||||
* @param boolean $v new value
|
* @param boolean $v new value
|
||||||
* @return CcFiles The current object (for fluent API support)
|
* @return CcFiles The current object (for fluent API support)
|
||||||
*/
|
*/
|
||||||
public function setDbFileExist($v)
|
public function setDbFileExists($v)
|
||||||
{
|
{
|
||||||
if ($v !== null) {
|
if ($v !== null) {
|
||||||
$v = (boolean) $v;
|
$v = (boolean) $v;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->file_exist !== $v || $this->isNew()) {
|
if ($this->file_exists !== $v || $this->isNew()) {
|
||||||
$this->file_exist = $v;
|
$this->file_exists = $v;
|
||||||
$this->modifiedColumns[] = CcFilesPeer::FILE_EXIST;
|
$this->modifiedColumns[] = CcFilesPeer::FILE_EXISTS;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
} // setDbFileExist()
|
} // setDbFileExists()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the value of [soundcloud_id] column.
|
* Set the value of [soundcloud_id] column.
|
||||||
|
@ -2579,7 +2579,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->file_exist !== true) {
|
if ($this->file_exists !== true) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2662,7 +2662,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
||||||
$this->subject = ($row[$startcol + 54] !== null) ? (string) $row[$startcol + 54] : null;
|
$this->subject = ($row[$startcol + 54] !== null) ? (string) $row[$startcol + 54] : null;
|
||||||
$this->contributor = ($row[$startcol + 55] !== null) ? (string) $row[$startcol + 55] : null;
|
$this->contributor = ($row[$startcol + 55] !== null) ? (string) $row[$startcol + 55] : null;
|
||||||
$this->language = ($row[$startcol + 56] !== null) ? (string) $row[$startcol + 56] : null;
|
$this->language = ($row[$startcol + 56] !== null) ? (string) $row[$startcol + 56] : null;
|
||||||
$this->file_exist = ($row[$startcol + 57] !== null) ? (boolean) $row[$startcol + 57] : null;
|
$this->file_exists = ($row[$startcol + 57] !== null) ? (boolean) $row[$startcol + 57] : null;
|
||||||
$this->soundcloud_id = ($row[$startcol + 58] !== null) ? (int) $row[$startcol + 58] : null;
|
$this->soundcloud_id = ($row[$startcol + 58] !== null) ? (int) $row[$startcol + 58] : null;
|
||||||
$this->soundcloud_error_code = ($row[$startcol + 59] !== null) ? (int) $row[$startcol + 59] : null;
|
$this->soundcloud_error_code = ($row[$startcol + 59] !== null) ? (int) $row[$startcol + 59] : null;
|
||||||
$this->soundcloud_error_msg = ($row[$startcol + 60] !== null) ? (string) $row[$startcol + 60] : null;
|
$this->soundcloud_error_msg = ($row[$startcol + 60] !== null) ? (string) $row[$startcol + 60] : null;
|
||||||
|
@ -3245,7 +3245,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
||||||
return $this->getDbLanguage();
|
return $this->getDbLanguage();
|
||||||
break;
|
break;
|
||||||
case 57:
|
case 57:
|
||||||
return $this->getDbFileExist();
|
return $this->getDbFileExists();
|
||||||
break;
|
break;
|
||||||
case 58:
|
case 58:
|
||||||
return $this->getDbSoundcloudId();
|
return $this->getDbSoundcloudId();
|
||||||
|
@ -3340,7 +3340,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
||||||
$keys[54] => $this->getDbSubject(),
|
$keys[54] => $this->getDbSubject(),
|
||||||
$keys[55] => $this->getDbContributor(),
|
$keys[55] => $this->getDbContributor(),
|
||||||
$keys[56] => $this->getDbLanguage(),
|
$keys[56] => $this->getDbLanguage(),
|
||||||
$keys[57] => $this->getDbFileExist(),
|
$keys[57] => $this->getDbFileExists(),
|
||||||
$keys[58] => $this->getDbSoundcloudId(),
|
$keys[58] => $this->getDbSoundcloudId(),
|
||||||
$keys[59] => $this->getDbSoundcloudErrorCode(),
|
$keys[59] => $this->getDbSoundcloudErrorCode(),
|
||||||
$keys[60] => $this->getDbSoundcloudErrorMsg(),
|
$keys[60] => $this->getDbSoundcloudErrorMsg(),
|
||||||
|
@ -3556,7 +3556,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
||||||
$this->setDbLanguage($value);
|
$this->setDbLanguage($value);
|
||||||
break;
|
break;
|
||||||
case 57:
|
case 57:
|
||||||
$this->setDbFileExist($value);
|
$this->setDbFileExists($value);
|
||||||
break;
|
break;
|
||||||
case 58:
|
case 58:
|
||||||
$this->setDbSoundcloudId($value);
|
$this->setDbSoundcloudId($value);
|
||||||
|
@ -3651,7 +3651,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
||||||
if (array_key_exists($keys[54], $arr)) $this->setDbSubject($arr[$keys[54]]);
|
if (array_key_exists($keys[54], $arr)) $this->setDbSubject($arr[$keys[54]]);
|
||||||
if (array_key_exists($keys[55], $arr)) $this->setDbContributor($arr[$keys[55]]);
|
if (array_key_exists($keys[55], $arr)) $this->setDbContributor($arr[$keys[55]]);
|
||||||
if (array_key_exists($keys[56], $arr)) $this->setDbLanguage($arr[$keys[56]]);
|
if (array_key_exists($keys[56], $arr)) $this->setDbLanguage($arr[$keys[56]]);
|
||||||
if (array_key_exists($keys[57], $arr)) $this->setDbFileExist($arr[$keys[57]]);
|
if (array_key_exists($keys[57], $arr)) $this->setDbFileExists($arr[$keys[57]]);
|
||||||
if (array_key_exists($keys[58], $arr)) $this->setDbSoundcloudId($arr[$keys[58]]);
|
if (array_key_exists($keys[58], $arr)) $this->setDbSoundcloudId($arr[$keys[58]]);
|
||||||
if (array_key_exists($keys[59], $arr)) $this->setDbSoundcloudErrorCode($arr[$keys[59]]);
|
if (array_key_exists($keys[59], $arr)) $this->setDbSoundcloudErrorCode($arr[$keys[59]]);
|
||||||
if (array_key_exists($keys[60], $arr)) $this->setDbSoundcloudErrorMsg($arr[$keys[60]]);
|
if (array_key_exists($keys[60], $arr)) $this->setDbSoundcloudErrorMsg($arr[$keys[60]]);
|
||||||
|
@ -3724,7 +3724,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
||||||
if ($this->isColumnModified(CcFilesPeer::SUBJECT)) $criteria->add(CcFilesPeer::SUBJECT, $this->subject);
|
if ($this->isColumnModified(CcFilesPeer::SUBJECT)) $criteria->add(CcFilesPeer::SUBJECT, $this->subject);
|
||||||
if ($this->isColumnModified(CcFilesPeer::CONTRIBUTOR)) $criteria->add(CcFilesPeer::CONTRIBUTOR, $this->contributor);
|
if ($this->isColumnModified(CcFilesPeer::CONTRIBUTOR)) $criteria->add(CcFilesPeer::CONTRIBUTOR, $this->contributor);
|
||||||
if ($this->isColumnModified(CcFilesPeer::LANGUAGE)) $criteria->add(CcFilesPeer::LANGUAGE, $this->language);
|
if ($this->isColumnModified(CcFilesPeer::LANGUAGE)) $criteria->add(CcFilesPeer::LANGUAGE, $this->language);
|
||||||
if ($this->isColumnModified(CcFilesPeer::FILE_EXIST)) $criteria->add(CcFilesPeer::FILE_EXIST, $this->file_exist);
|
if ($this->isColumnModified(CcFilesPeer::FILE_EXISTS)) $criteria->add(CcFilesPeer::FILE_EXISTS, $this->file_exists);
|
||||||
if ($this->isColumnModified(CcFilesPeer::SOUNDCLOUD_ID)) $criteria->add(CcFilesPeer::SOUNDCLOUD_ID, $this->soundcloud_id);
|
if ($this->isColumnModified(CcFilesPeer::SOUNDCLOUD_ID)) $criteria->add(CcFilesPeer::SOUNDCLOUD_ID, $this->soundcloud_id);
|
||||||
if ($this->isColumnModified(CcFilesPeer::SOUNDCLOUD_ERROR_CODE)) $criteria->add(CcFilesPeer::SOUNDCLOUD_ERROR_CODE, $this->soundcloud_error_code);
|
if ($this->isColumnModified(CcFilesPeer::SOUNDCLOUD_ERROR_CODE)) $criteria->add(CcFilesPeer::SOUNDCLOUD_ERROR_CODE, $this->soundcloud_error_code);
|
||||||
if ($this->isColumnModified(CcFilesPeer::SOUNDCLOUD_ERROR_MSG)) $criteria->add(CcFilesPeer::SOUNDCLOUD_ERROR_MSG, $this->soundcloud_error_msg);
|
if ($this->isColumnModified(CcFilesPeer::SOUNDCLOUD_ERROR_MSG)) $criteria->add(CcFilesPeer::SOUNDCLOUD_ERROR_MSG, $this->soundcloud_error_msg);
|
||||||
|
@ -3846,7 +3846,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
||||||
$copyObj->setDbSubject($this->subject);
|
$copyObj->setDbSubject($this->subject);
|
||||||
$copyObj->setDbContributor($this->contributor);
|
$copyObj->setDbContributor($this->contributor);
|
||||||
$copyObj->setDbLanguage($this->language);
|
$copyObj->setDbLanguage($this->language);
|
||||||
$copyObj->setDbFileExist($this->file_exist);
|
$copyObj->setDbFileExists($this->file_exists);
|
||||||
$copyObj->setDbSoundcloudId($this->soundcloud_id);
|
$copyObj->setDbSoundcloudId($this->soundcloud_id);
|
||||||
$copyObj->setDbSoundcloudErrorCode($this->soundcloud_error_code);
|
$copyObj->setDbSoundcloudErrorCode($this->soundcloud_error_code);
|
||||||
$copyObj->setDbSoundcloudErrorMsg($this->soundcloud_error_msg);
|
$copyObj->setDbSoundcloudErrorMsg($this->soundcloud_error_msg);
|
||||||
|
@ -4507,7 +4507,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
||||||
$this->subject = null;
|
$this->subject = null;
|
||||||
$this->contributor = null;
|
$this->contributor = null;
|
||||||
$this->language = null;
|
$this->language = null;
|
||||||
$this->file_exist = null;
|
$this->file_exists = null;
|
||||||
$this->soundcloud_id = null;
|
$this->soundcloud_id = null;
|
||||||
$this->soundcloud_error_code = null;
|
$this->soundcloud_error_code = null;
|
||||||
$this->soundcloud_error_msg = null;
|
$this->soundcloud_error_msg = null;
|
||||||
|
|
|
@ -202,8 +202,8 @@ abstract class BaseCcFilesPeer {
|
||||||
/** the column name for the LANGUAGE field */
|
/** the column name for the LANGUAGE field */
|
||||||
const LANGUAGE = 'cc_files.LANGUAGE';
|
const LANGUAGE = 'cc_files.LANGUAGE';
|
||||||
|
|
||||||
/** the column name for the FILE_EXIST field */
|
/** the column name for the FILE_EXISTS field */
|
||||||
const FILE_EXIST = 'cc_files.FILE_EXIST';
|
const FILE_EXISTS = 'cc_files.FILE_EXISTS';
|
||||||
|
|
||||||
/** the column name for the SOUNDCLOUD_ID field */
|
/** the column name for the SOUNDCLOUD_ID field */
|
||||||
const SOUNDCLOUD_ID = 'cc_files.SOUNDCLOUD_ID';
|
const SOUNDCLOUD_ID = 'cc_files.SOUNDCLOUD_ID';
|
||||||
|
@ -233,11 +233,11 @@ abstract class BaseCcFilesPeer {
|
||||||
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
||||||
*/
|
*/
|
||||||
private static $fieldNames = array (
|
private static $fieldNames = array (
|
||||||
BasePeer::TYPE_PHPNAME => array ('DbId', 'DbGunid', 'DbName', 'DbMime', 'DbFtype', 'DbDirectory', 'DbFilepath', 'DbState', 'DbCurrentlyaccessing', 'DbEditedby', 'DbMtime', 'DbUtime', 'DbLPtime', 'DbMd5', 'DbTrackTitle', 'DbArtistName', 'DbBitRate', 'DbSampleRate', 'DbFormat', 'DbLength', 'DbAlbumTitle', 'DbGenre', 'DbComments', 'DbYear', 'DbTrackNumber', 'DbChannels', 'DbUrl', 'DbBpm', 'DbRating', 'DbEncodedBy', 'DbDiscNumber', 'DbMood', 'DbLabel', 'DbComposer', 'DbEncoder', 'DbChecksum', 'DbLyrics', 'DbOrchestra', 'DbConductor', 'DbLyricist', 'DbOriginalLyricist', 'DbRadioStationName', 'DbInfoUrl', 'DbArtistUrl', 'DbAudioSourceUrl', 'DbRadioStationUrl', 'DbBuyThisUrl', 'DbIsrcNumber', 'DbCatalogNumber', 'DbOriginalArtist', 'DbCopyright', 'DbReportDatetime', 'DbReportLocation', 'DbReportOrganization', 'DbSubject', 'DbContributor', 'DbLanguage', 'DbFileExist', 'DbSoundcloudId', 'DbSoundcloudErrorCode', 'DbSoundcloudErrorMsg', 'DbSoundcloudLinkToFile', ),
|
BasePeer::TYPE_PHPNAME => array ('DbId', 'DbGunid', 'DbName', 'DbMime', 'DbFtype', 'DbDirectory', 'DbFilepath', 'DbState', 'DbCurrentlyaccessing', 'DbEditedby', 'DbMtime', 'DbUtime', 'DbLPtime', 'DbMd5', 'DbTrackTitle', 'DbArtistName', 'DbBitRate', 'DbSampleRate', 'DbFormat', 'DbLength', 'DbAlbumTitle', 'DbGenre', 'DbComments', 'DbYear', 'DbTrackNumber', 'DbChannels', 'DbUrl', 'DbBpm', 'DbRating', 'DbEncodedBy', 'DbDiscNumber', 'DbMood', 'DbLabel', 'DbComposer', 'DbEncoder', 'DbChecksum', 'DbLyrics', 'DbOrchestra', 'DbConductor', 'DbLyricist', 'DbOriginalLyricist', 'DbRadioStationName', 'DbInfoUrl', 'DbArtistUrl', 'DbAudioSourceUrl', 'DbRadioStationUrl', 'DbBuyThisUrl', 'DbIsrcNumber', 'DbCatalogNumber', 'DbOriginalArtist', 'DbCopyright', 'DbReportDatetime', 'DbReportLocation', 'DbReportOrganization', 'DbSubject', 'DbContributor', 'DbLanguage', 'DbFileExists', 'DbSoundcloudId', 'DbSoundcloudErrorCode', 'DbSoundcloudErrorMsg', 'DbSoundcloudLinkToFile', ),
|
||||||
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbGunid', 'dbName', 'dbMime', 'dbFtype', 'dbDirectory', 'dbFilepath', 'dbState', 'dbCurrentlyaccessing', 'dbEditedby', 'dbMtime', 'dbUtime', 'dbLPtime', 'dbMd5', 'dbTrackTitle', 'dbArtistName', 'dbBitRate', 'dbSampleRate', 'dbFormat', 'dbLength', 'dbAlbumTitle', 'dbGenre', 'dbComments', 'dbYear', 'dbTrackNumber', 'dbChannels', 'dbUrl', 'dbBpm', 'dbRating', 'dbEncodedBy', 'dbDiscNumber', 'dbMood', 'dbLabel', 'dbComposer', 'dbEncoder', 'dbChecksum', 'dbLyrics', 'dbOrchestra', 'dbConductor', 'dbLyricist', 'dbOriginalLyricist', 'dbRadioStationName', 'dbInfoUrl', 'dbArtistUrl', 'dbAudioSourceUrl', 'dbRadioStationUrl', 'dbBuyThisUrl', 'dbIsrcNumber', 'dbCatalogNumber', 'dbOriginalArtist', 'dbCopyright', 'dbReportDatetime', 'dbReportLocation', 'dbReportOrganization', 'dbSubject', 'dbContributor', 'dbLanguage', 'dbFileExist', 'dbSoundcloudId', 'dbSoundcloudErrorCode', 'dbSoundcloudErrorMsg', 'dbSoundcloudLinkToFile', ),
|
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbGunid', 'dbName', 'dbMime', 'dbFtype', 'dbDirectory', 'dbFilepath', 'dbState', 'dbCurrentlyaccessing', 'dbEditedby', 'dbMtime', 'dbUtime', 'dbLPtime', 'dbMd5', 'dbTrackTitle', 'dbArtistName', 'dbBitRate', 'dbSampleRate', 'dbFormat', 'dbLength', 'dbAlbumTitle', 'dbGenre', 'dbComments', 'dbYear', 'dbTrackNumber', 'dbChannels', 'dbUrl', 'dbBpm', 'dbRating', 'dbEncodedBy', 'dbDiscNumber', 'dbMood', 'dbLabel', 'dbComposer', 'dbEncoder', 'dbChecksum', 'dbLyrics', 'dbOrchestra', 'dbConductor', 'dbLyricist', 'dbOriginalLyricist', 'dbRadioStationName', 'dbInfoUrl', 'dbArtistUrl', 'dbAudioSourceUrl', 'dbRadioStationUrl', 'dbBuyThisUrl', 'dbIsrcNumber', 'dbCatalogNumber', 'dbOriginalArtist', 'dbCopyright', 'dbReportDatetime', 'dbReportLocation', 'dbReportOrganization', 'dbSubject', 'dbContributor', 'dbLanguage', 'dbFileExists', 'dbSoundcloudId', 'dbSoundcloudErrorCode', 'dbSoundcloudErrorMsg', 'dbSoundcloudLinkToFile', ),
|
||||||
BasePeer::TYPE_COLNAME => array (self::ID, self::GUNID, self::NAME, self::MIME, self::FTYPE, self::DIRECTORY, self::FILEPATH, self::STATE, self::CURRENTLYACCESSING, self::EDITEDBY, self::MTIME, self::UTIME, self::LPTIME, self::MD5, self::TRACK_TITLE, self::ARTIST_NAME, self::BIT_RATE, self::SAMPLE_RATE, self::FORMAT, self::LENGTH, self::ALBUM_TITLE, self::GENRE, self::COMMENTS, self::YEAR, self::TRACK_NUMBER, self::CHANNELS, self::URL, self::BPM, self::RATING, self::ENCODED_BY, self::DISC_NUMBER, self::MOOD, self::LABEL, self::COMPOSER, self::ENCODER, self::CHECKSUM, self::LYRICS, self::ORCHESTRA, self::CONDUCTOR, self::LYRICIST, self::ORIGINAL_LYRICIST, self::RADIO_STATION_NAME, self::INFO_URL, self::ARTIST_URL, self::AUDIO_SOURCE_URL, self::RADIO_STATION_URL, self::BUY_THIS_URL, self::ISRC_NUMBER, self::CATALOG_NUMBER, self::ORIGINAL_ARTIST, self::COPYRIGHT, self::REPORT_DATETIME, self::REPORT_LOCATION, self::REPORT_ORGANIZATION, self::SUBJECT, self::CONTRIBUTOR, self::LANGUAGE, self::FILE_EXIST, self::SOUNDCLOUD_ID, self::SOUNDCLOUD_ERROR_CODE, self::SOUNDCLOUD_ERROR_MSG, self::SOUNDCLOUD_LINK_TO_FILE, ),
|
BasePeer::TYPE_COLNAME => array (self::ID, self::GUNID, self::NAME, self::MIME, self::FTYPE, self::DIRECTORY, self::FILEPATH, self::STATE, self::CURRENTLYACCESSING, self::EDITEDBY, self::MTIME, self::UTIME, self::LPTIME, self::MD5, self::TRACK_TITLE, self::ARTIST_NAME, self::BIT_RATE, self::SAMPLE_RATE, self::FORMAT, self::LENGTH, self::ALBUM_TITLE, self::GENRE, self::COMMENTS, self::YEAR, self::TRACK_NUMBER, self::CHANNELS, self::URL, self::BPM, self::RATING, self::ENCODED_BY, self::DISC_NUMBER, self::MOOD, self::LABEL, self::COMPOSER, self::ENCODER, self::CHECKSUM, self::LYRICS, self::ORCHESTRA, self::CONDUCTOR, self::LYRICIST, self::ORIGINAL_LYRICIST, self::RADIO_STATION_NAME, self::INFO_URL, self::ARTIST_URL, self::AUDIO_SOURCE_URL, self::RADIO_STATION_URL, self::BUY_THIS_URL, self::ISRC_NUMBER, self::CATALOG_NUMBER, self::ORIGINAL_ARTIST, self::COPYRIGHT, self::REPORT_DATETIME, self::REPORT_LOCATION, self::REPORT_ORGANIZATION, self::SUBJECT, self::CONTRIBUTOR, self::LANGUAGE, self::FILE_EXISTS, self::SOUNDCLOUD_ID, self::SOUNDCLOUD_ERROR_CODE, self::SOUNDCLOUD_ERROR_MSG, self::SOUNDCLOUD_LINK_TO_FILE, ),
|
||||||
BasePeer::TYPE_RAW_COLNAME => array ('ID', 'GUNID', 'NAME', 'MIME', 'FTYPE', 'DIRECTORY', 'FILEPATH', 'STATE', 'CURRENTLYACCESSING', 'EDITEDBY', 'MTIME', 'UTIME', 'LPTIME', 'MD5', 'TRACK_TITLE', 'ARTIST_NAME', 'BIT_RATE', 'SAMPLE_RATE', 'FORMAT', 'LENGTH', 'ALBUM_TITLE', 'GENRE', 'COMMENTS', 'YEAR', 'TRACK_NUMBER', 'CHANNELS', 'URL', 'BPM', 'RATING', 'ENCODED_BY', 'DISC_NUMBER', 'MOOD', 'LABEL', 'COMPOSER', 'ENCODER', 'CHECKSUM', 'LYRICS', 'ORCHESTRA', 'CONDUCTOR', 'LYRICIST', 'ORIGINAL_LYRICIST', 'RADIO_STATION_NAME', 'INFO_URL', 'ARTIST_URL', 'AUDIO_SOURCE_URL', 'RADIO_STATION_URL', 'BUY_THIS_URL', 'ISRC_NUMBER', 'CATALOG_NUMBER', 'ORIGINAL_ARTIST', 'COPYRIGHT', 'REPORT_DATETIME', 'REPORT_LOCATION', 'REPORT_ORGANIZATION', 'SUBJECT', 'CONTRIBUTOR', 'LANGUAGE', 'FILE_EXIST', 'SOUNDCLOUD_ID', 'SOUNDCLOUD_ERROR_CODE', 'SOUNDCLOUD_ERROR_MSG', 'SOUNDCLOUD_LINK_TO_FILE', ),
|
BasePeer::TYPE_RAW_COLNAME => array ('ID', 'GUNID', 'NAME', 'MIME', 'FTYPE', 'DIRECTORY', 'FILEPATH', 'STATE', 'CURRENTLYACCESSING', 'EDITEDBY', 'MTIME', 'UTIME', 'LPTIME', 'MD5', 'TRACK_TITLE', 'ARTIST_NAME', 'BIT_RATE', 'SAMPLE_RATE', 'FORMAT', 'LENGTH', 'ALBUM_TITLE', 'GENRE', 'COMMENTS', 'YEAR', 'TRACK_NUMBER', 'CHANNELS', 'URL', 'BPM', 'RATING', 'ENCODED_BY', 'DISC_NUMBER', 'MOOD', 'LABEL', 'COMPOSER', 'ENCODER', 'CHECKSUM', 'LYRICS', 'ORCHESTRA', 'CONDUCTOR', 'LYRICIST', 'ORIGINAL_LYRICIST', 'RADIO_STATION_NAME', 'INFO_URL', 'ARTIST_URL', 'AUDIO_SOURCE_URL', 'RADIO_STATION_URL', 'BUY_THIS_URL', 'ISRC_NUMBER', 'CATALOG_NUMBER', 'ORIGINAL_ARTIST', 'COPYRIGHT', 'REPORT_DATETIME', 'REPORT_LOCATION', 'REPORT_ORGANIZATION', 'SUBJECT', 'CONTRIBUTOR', 'LANGUAGE', 'FILE_EXISTS', 'SOUNDCLOUD_ID', 'SOUNDCLOUD_ERROR_CODE', 'SOUNDCLOUD_ERROR_MSG', 'SOUNDCLOUD_LINK_TO_FILE', ),
|
||||||
BasePeer::TYPE_FIELDNAME => array ('id', 'gunid', 'name', 'mime', 'ftype', 'directory', 'filepath', 'state', 'currentlyaccessing', 'editedby', 'mtime', 'utime', 'lptime', 'md5', 'track_title', 'artist_name', 'bit_rate', 'sample_rate', 'format', 'length', 'album_title', 'genre', 'comments', 'year', 'track_number', 'channels', 'url', 'bpm', 'rating', 'encoded_by', 'disc_number', 'mood', 'label', 'composer', 'encoder', 'checksum', 'lyrics', 'orchestra', 'conductor', 'lyricist', 'original_lyricist', 'radio_station_name', 'info_url', 'artist_url', 'audio_source_url', 'radio_station_url', 'buy_this_url', 'isrc_number', 'catalog_number', 'original_artist', 'copyright', 'report_datetime', 'report_location', 'report_organization', 'subject', 'contributor', 'language', 'file_exist', 'soundcloud_id', 'soundcloud_error_code', 'soundcloud_error_msg', 'soundcloud_link_to_file', ),
|
BasePeer::TYPE_FIELDNAME => array ('id', 'gunid', 'name', 'mime', 'ftype', 'directory', 'filepath', 'state', 'currentlyaccessing', 'editedby', 'mtime', 'utime', 'lptime', 'md5', 'track_title', 'artist_name', 'bit_rate', 'sample_rate', 'format', 'length', 'album_title', 'genre', 'comments', 'year', 'track_number', 'channels', 'url', 'bpm', 'rating', 'encoded_by', 'disc_number', 'mood', 'label', 'composer', 'encoder', 'checksum', 'lyrics', 'orchestra', 'conductor', 'lyricist', 'original_lyricist', 'radio_station_name', 'info_url', 'artist_url', 'audio_source_url', 'radio_station_url', 'buy_this_url', 'isrc_number', 'catalog_number', 'original_artist', 'copyright', 'report_datetime', 'report_location', 'report_organization', 'subject', 'contributor', 'language', 'file_exists', 'soundcloud_id', 'soundcloud_error_code', 'soundcloud_error_msg', 'soundcloud_link_to_file', ),
|
||||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, )
|
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, )
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -248,11 +248,11 @@ abstract class BaseCcFilesPeer {
|
||||||
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
|
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
|
||||||
*/
|
*/
|
||||||
private static $fieldKeys = array (
|
private static $fieldKeys = array (
|
||||||
BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbGunid' => 1, 'DbName' => 2, 'DbMime' => 3, 'DbFtype' => 4, 'DbDirectory' => 5, 'DbFilepath' => 6, 'DbState' => 7, 'DbCurrentlyaccessing' => 8, 'DbEditedby' => 9, 'DbMtime' => 10, 'DbUtime' => 11, 'DbLPtime' => 12, 'DbMd5' => 13, 'DbTrackTitle' => 14, 'DbArtistName' => 15, 'DbBitRate' => 16, 'DbSampleRate' => 17, 'DbFormat' => 18, 'DbLength' => 19, 'DbAlbumTitle' => 20, 'DbGenre' => 21, 'DbComments' => 22, 'DbYear' => 23, 'DbTrackNumber' => 24, 'DbChannels' => 25, 'DbUrl' => 26, 'DbBpm' => 27, 'DbRating' => 28, 'DbEncodedBy' => 29, 'DbDiscNumber' => 30, 'DbMood' => 31, 'DbLabel' => 32, 'DbComposer' => 33, 'DbEncoder' => 34, 'DbChecksum' => 35, 'DbLyrics' => 36, 'DbOrchestra' => 37, 'DbConductor' => 38, 'DbLyricist' => 39, 'DbOriginalLyricist' => 40, 'DbRadioStationName' => 41, 'DbInfoUrl' => 42, 'DbArtistUrl' => 43, 'DbAudioSourceUrl' => 44, 'DbRadioStationUrl' => 45, 'DbBuyThisUrl' => 46, 'DbIsrcNumber' => 47, 'DbCatalogNumber' => 48, 'DbOriginalArtist' => 49, 'DbCopyright' => 50, 'DbReportDatetime' => 51, 'DbReportLocation' => 52, 'DbReportOrganization' => 53, 'DbSubject' => 54, 'DbContributor' => 55, 'DbLanguage' => 56, 'DbFileExist' => 57, 'DbSoundcloudId' => 58, 'DbSoundcloudErrorCode' => 59, 'DbSoundcloudErrorMsg' => 60, 'DbSoundcloudLinkToFile' => 61, ),
|
BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbGunid' => 1, 'DbName' => 2, 'DbMime' => 3, 'DbFtype' => 4, 'DbDirectory' => 5, 'DbFilepath' => 6, 'DbState' => 7, 'DbCurrentlyaccessing' => 8, 'DbEditedby' => 9, 'DbMtime' => 10, 'DbUtime' => 11, 'DbLPtime' => 12, 'DbMd5' => 13, 'DbTrackTitle' => 14, 'DbArtistName' => 15, 'DbBitRate' => 16, 'DbSampleRate' => 17, 'DbFormat' => 18, 'DbLength' => 19, 'DbAlbumTitle' => 20, 'DbGenre' => 21, 'DbComments' => 22, 'DbYear' => 23, 'DbTrackNumber' => 24, 'DbChannels' => 25, 'DbUrl' => 26, 'DbBpm' => 27, 'DbRating' => 28, 'DbEncodedBy' => 29, 'DbDiscNumber' => 30, 'DbMood' => 31, 'DbLabel' => 32, 'DbComposer' => 33, 'DbEncoder' => 34, 'DbChecksum' => 35, 'DbLyrics' => 36, 'DbOrchestra' => 37, 'DbConductor' => 38, 'DbLyricist' => 39, 'DbOriginalLyricist' => 40, 'DbRadioStationName' => 41, 'DbInfoUrl' => 42, 'DbArtistUrl' => 43, 'DbAudioSourceUrl' => 44, 'DbRadioStationUrl' => 45, 'DbBuyThisUrl' => 46, 'DbIsrcNumber' => 47, 'DbCatalogNumber' => 48, 'DbOriginalArtist' => 49, 'DbCopyright' => 50, 'DbReportDatetime' => 51, 'DbReportLocation' => 52, 'DbReportOrganization' => 53, 'DbSubject' => 54, 'DbContributor' => 55, 'DbLanguage' => 56, 'DbFileExists' => 57, 'DbSoundcloudId' => 58, 'DbSoundcloudErrorCode' => 59, 'DbSoundcloudErrorMsg' => 60, 'DbSoundcloudLinkToFile' => 61, ),
|
||||||
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbGunid' => 1, 'dbName' => 2, 'dbMime' => 3, 'dbFtype' => 4, 'dbDirectory' => 5, 'dbFilepath' => 6, 'dbState' => 7, 'dbCurrentlyaccessing' => 8, 'dbEditedby' => 9, 'dbMtime' => 10, 'dbUtime' => 11, 'dbLPtime' => 12, 'dbMd5' => 13, 'dbTrackTitle' => 14, 'dbArtistName' => 15, 'dbBitRate' => 16, 'dbSampleRate' => 17, 'dbFormat' => 18, 'dbLength' => 19, 'dbAlbumTitle' => 20, 'dbGenre' => 21, 'dbComments' => 22, 'dbYear' => 23, 'dbTrackNumber' => 24, 'dbChannels' => 25, 'dbUrl' => 26, 'dbBpm' => 27, 'dbRating' => 28, 'dbEncodedBy' => 29, 'dbDiscNumber' => 30, 'dbMood' => 31, 'dbLabel' => 32, 'dbComposer' => 33, 'dbEncoder' => 34, 'dbChecksum' => 35, 'dbLyrics' => 36, 'dbOrchestra' => 37, 'dbConductor' => 38, 'dbLyricist' => 39, 'dbOriginalLyricist' => 40, 'dbRadioStationName' => 41, 'dbInfoUrl' => 42, 'dbArtistUrl' => 43, 'dbAudioSourceUrl' => 44, 'dbRadioStationUrl' => 45, 'dbBuyThisUrl' => 46, 'dbIsrcNumber' => 47, 'dbCatalogNumber' => 48, 'dbOriginalArtist' => 49, 'dbCopyright' => 50, 'dbReportDatetime' => 51, 'dbReportLocation' => 52, 'dbReportOrganization' => 53, 'dbSubject' => 54, 'dbContributor' => 55, 'dbLanguage' => 56, 'dbFileExist' => 57, 'dbSoundcloudId' => 58, 'dbSoundcloudErrorCode' => 59, 'dbSoundcloudErrorMsg' => 60, 'dbSoundcloudLinkToFile' => 61, ),
|
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbGunid' => 1, 'dbName' => 2, 'dbMime' => 3, 'dbFtype' => 4, 'dbDirectory' => 5, 'dbFilepath' => 6, 'dbState' => 7, 'dbCurrentlyaccessing' => 8, 'dbEditedby' => 9, 'dbMtime' => 10, 'dbUtime' => 11, 'dbLPtime' => 12, 'dbMd5' => 13, 'dbTrackTitle' => 14, 'dbArtistName' => 15, 'dbBitRate' => 16, 'dbSampleRate' => 17, 'dbFormat' => 18, 'dbLength' => 19, 'dbAlbumTitle' => 20, 'dbGenre' => 21, 'dbComments' => 22, 'dbYear' => 23, 'dbTrackNumber' => 24, 'dbChannels' => 25, 'dbUrl' => 26, 'dbBpm' => 27, 'dbRating' => 28, 'dbEncodedBy' => 29, 'dbDiscNumber' => 30, 'dbMood' => 31, 'dbLabel' => 32, 'dbComposer' => 33, 'dbEncoder' => 34, 'dbChecksum' => 35, 'dbLyrics' => 36, 'dbOrchestra' => 37, 'dbConductor' => 38, 'dbLyricist' => 39, 'dbOriginalLyricist' => 40, 'dbRadioStationName' => 41, 'dbInfoUrl' => 42, 'dbArtistUrl' => 43, 'dbAudioSourceUrl' => 44, 'dbRadioStationUrl' => 45, 'dbBuyThisUrl' => 46, 'dbIsrcNumber' => 47, 'dbCatalogNumber' => 48, 'dbOriginalArtist' => 49, 'dbCopyright' => 50, 'dbReportDatetime' => 51, 'dbReportLocation' => 52, 'dbReportOrganization' => 53, 'dbSubject' => 54, 'dbContributor' => 55, 'dbLanguage' => 56, 'dbFileExists' => 57, 'dbSoundcloudId' => 58, 'dbSoundcloudErrorCode' => 59, 'dbSoundcloudErrorMsg' => 60, 'dbSoundcloudLinkToFile' => 61, ),
|
||||||
BasePeer::TYPE_COLNAME => array (self::ID => 0, self::GUNID => 1, self::NAME => 2, self::MIME => 3, self::FTYPE => 4, self::DIRECTORY => 5, self::FILEPATH => 6, self::STATE => 7, self::CURRENTLYACCESSING => 8, self::EDITEDBY => 9, self::MTIME => 10, self::UTIME => 11, self::LPTIME => 12, self::MD5 => 13, self::TRACK_TITLE => 14, self::ARTIST_NAME => 15, self::BIT_RATE => 16, self::SAMPLE_RATE => 17, self::FORMAT => 18, self::LENGTH => 19, self::ALBUM_TITLE => 20, self::GENRE => 21, self::COMMENTS => 22, self::YEAR => 23, self::TRACK_NUMBER => 24, self::CHANNELS => 25, self::URL => 26, self::BPM => 27, self::RATING => 28, self::ENCODED_BY => 29, self::DISC_NUMBER => 30, self::MOOD => 31, self::LABEL => 32, self::COMPOSER => 33, self::ENCODER => 34, self::CHECKSUM => 35, self::LYRICS => 36, self::ORCHESTRA => 37, self::CONDUCTOR => 38, self::LYRICIST => 39, self::ORIGINAL_LYRICIST => 40, self::RADIO_STATION_NAME => 41, self::INFO_URL => 42, self::ARTIST_URL => 43, self::AUDIO_SOURCE_URL => 44, self::RADIO_STATION_URL => 45, self::BUY_THIS_URL => 46, self::ISRC_NUMBER => 47, self::CATALOG_NUMBER => 48, self::ORIGINAL_ARTIST => 49, self::COPYRIGHT => 50, self::REPORT_DATETIME => 51, self::REPORT_LOCATION => 52, self::REPORT_ORGANIZATION => 53, self::SUBJECT => 54, self::CONTRIBUTOR => 55, self::LANGUAGE => 56, self::FILE_EXIST => 57, self::SOUNDCLOUD_ID => 58, self::SOUNDCLOUD_ERROR_CODE => 59, self::SOUNDCLOUD_ERROR_MSG => 60, self::SOUNDCLOUD_LINK_TO_FILE => 61, ),
|
BasePeer::TYPE_COLNAME => array (self::ID => 0, self::GUNID => 1, self::NAME => 2, self::MIME => 3, self::FTYPE => 4, self::DIRECTORY => 5, self::FILEPATH => 6, self::STATE => 7, self::CURRENTLYACCESSING => 8, self::EDITEDBY => 9, self::MTIME => 10, self::UTIME => 11, self::LPTIME => 12, self::MD5 => 13, self::TRACK_TITLE => 14, self::ARTIST_NAME => 15, self::BIT_RATE => 16, self::SAMPLE_RATE => 17, self::FORMAT => 18, self::LENGTH => 19, self::ALBUM_TITLE => 20, self::GENRE => 21, self::COMMENTS => 22, self::YEAR => 23, self::TRACK_NUMBER => 24, self::CHANNELS => 25, self::URL => 26, self::BPM => 27, self::RATING => 28, self::ENCODED_BY => 29, self::DISC_NUMBER => 30, self::MOOD => 31, self::LABEL => 32, self::COMPOSER => 33, self::ENCODER => 34, self::CHECKSUM => 35, self::LYRICS => 36, self::ORCHESTRA => 37, self::CONDUCTOR => 38, self::LYRICIST => 39, self::ORIGINAL_LYRICIST => 40, self::RADIO_STATION_NAME => 41, self::INFO_URL => 42, self::ARTIST_URL => 43, self::AUDIO_SOURCE_URL => 44, self::RADIO_STATION_URL => 45, self::BUY_THIS_URL => 46, self::ISRC_NUMBER => 47, self::CATALOG_NUMBER => 48, self::ORIGINAL_ARTIST => 49, self::COPYRIGHT => 50, self::REPORT_DATETIME => 51, self::REPORT_LOCATION => 52, self::REPORT_ORGANIZATION => 53, self::SUBJECT => 54, self::CONTRIBUTOR => 55, self::LANGUAGE => 56, self::FILE_EXISTS => 57, self::SOUNDCLOUD_ID => 58, self::SOUNDCLOUD_ERROR_CODE => 59, self::SOUNDCLOUD_ERROR_MSG => 60, self::SOUNDCLOUD_LINK_TO_FILE => 61, ),
|
||||||
BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'GUNID' => 1, 'NAME' => 2, 'MIME' => 3, 'FTYPE' => 4, 'DIRECTORY' => 5, 'FILEPATH' => 6, 'STATE' => 7, 'CURRENTLYACCESSING' => 8, 'EDITEDBY' => 9, 'MTIME' => 10, 'UTIME' => 11, 'LPTIME' => 12, 'MD5' => 13, 'TRACK_TITLE' => 14, 'ARTIST_NAME' => 15, 'BIT_RATE' => 16, 'SAMPLE_RATE' => 17, 'FORMAT' => 18, 'LENGTH' => 19, 'ALBUM_TITLE' => 20, 'GENRE' => 21, 'COMMENTS' => 22, 'YEAR' => 23, 'TRACK_NUMBER' => 24, 'CHANNELS' => 25, 'URL' => 26, 'BPM' => 27, 'RATING' => 28, 'ENCODED_BY' => 29, 'DISC_NUMBER' => 30, 'MOOD' => 31, 'LABEL' => 32, 'COMPOSER' => 33, 'ENCODER' => 34, 'CHECKSUM' => 35, 'LYRICS' => 36, 'ORCHESTRA' => 37, 'CONDUCTOR' => 38, 'LYRICIST' => 39, 'ORIGINAL_LYRICIST' => 40, 'RADIO_STATION_NAME' => 41, 'INFO_URL' => 42, 'ARTIST_URL' => 43, 'AUDIO_SOURCE_URL' => 44, 'RADIO_STATION_URL' => 45, 'BUY_THIS_URL' => 46, 'ISRC_NUMBER' => 47, 'CATALOG_NUMBER' => 48, 'ORIGINAL_ARTIST' => 49, 'COPYRIGHT' => 50, 'REPORT_DATETIME' => 51, 'REPORT_LOCATION' => 52, 'REPORT_ORGANIZATION' => 53, 'SUBJECT' => 54, 'CONTRIBUTOR' => 55, 'LANGUAGE' => 56, 'FILE_EXIST' => 57, 'SOUNDCLOUD_ID' => 58, 'SOUNDCLOUD_ERROR_CODE' => 59, 'SOUNDCLOUD_ERROR_MSG' => 60, 'SOUNDCLOUD_LINK_TO_FILE' => 61, ),
|
BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'GUNID' => 1, 'NAME' => 2, 'MIME' => 3, 'FTYPE' => 4, 'DIRECTORY' => 5, 'FILEPATH' => 6, 'STATE' => 7, 'CURRENTLYACCESSING' => 8, 'EDITEDBY' => 9, 'MTIME' => 10, 'UTIME' => 11, 'LPTIME' => 12, 'MD5' => 13, 'TRACK_TITLE' => 14, 'ARTIST_NAME' => 15, 'BIT_RATE' => 16, 'SAMPLE_RATE' => 17, 'FORMAT' => 18, 'LENGTH' => 19, 'ALBUM_TITLE' => 20, 'GENRE' => 21, 'COMMENTS' => 22, 'YEAR' => 23, 'TRACK_NUMBER' => 24, 'CHANNELS' => 25, 'URL' => 26, 'BPM' => 27, 'RATING' => 28, 'ENCODED_BY' => 29, 'DISC_NUMBER' => 30, 'MOOD' => 31, 'LABEL' => 32, 'COMPOSER' => 33, 'ENCODER' => 34, 'CHECKSUM' => 35, 'LYRICS' => 36, 'ORCHESTRA' => 37, 'CONDUCTOR' => 38, 'LYRICIST' => 39, 'ORIGINAL_LYRICIST' => 40, 'RADIO_STATION_NAME' => 41, 'INFO_URL' => 42, 'ARTIST_URL' => 43, 'AUDIO_SOURCE_URL' => 44, 'RADIO_STATION_URL' => 45, 'BUY_THIS_URL' => 46, 'ISRC_NUMBER' => 47, 'CATALOG_NUMBER' => 48, 'ORIGINAL_ARTIST' => 49, 'COPYRIGHT' => 50, 'REPORT_DATETIME' => 51, 'REPORT_LOCATION' => 52, 'REPORT_ORGANIZATION' => 53, 'SUBJECT' => 54, 'CONTRIBUTOR' => 55, 'LANGUAGE' => 56, 'FILE_EXISTS' => 57, 'SOUNDCLOUD_ID' => 58, 'SOUNDCLOUD_ERROR_CODE' => 59, 'SOUNDCLOUD_ERROR_MSG' => 60, 'SOUNDCLOUD_LINK_TO_FILE' => 61, ),
|
||||||
BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'gunid' => 1, 'name' => 2, 'mime' => 3, 'ftype' => 4, 'directory' => 5, 'filepath' => 6, 'state' => 7, 'currentlyaccessing' => 8, 'editedby' => 9, 'mtime' => 10, 'utime' => 11, 'lptime' => 12, 'md5' => 13, 'track_title' => 14, 'artist_name' => 15, 'bit_rate' => 16, 'sample_rate' => 17, 'format' => 18, 'length' => 19, 'album_title' => 20, 'genre' => 21, 'comments' => 22, 'year' => 23, 'track_number' => 24, 'channels' => 25, 'url' => 26, 'bpm' => 27, 'rating' => 28, 'encoded_by' => 29, 'disc_number' => 30, 'mood' => 31, 'label' => 32, 'composer' => 33, 'encoder' => 34, 'checksum' => 35, 'lyrics' => 36, 'orchestra' => 37, 'conductor' => 38, 'lyricist' => 39, 'original_lyricist' => 40, 'radio_station_name' => 41, 'info_url' => 42, 'artist_url' => 43, 'audio_source_url' => 44, 'radio_station_url' => 45, 'buy_this_url' => 46, 'isrc_number' => 47, 'catalog_number' => 48, 'original_artist' => 49, 'copyright' => 50, 'report_datetime' => 51, 'report_location' => 52, 'report_organization' => 53, 'subject' => 54, 'contributor' => 55, 'language' => 56, 'file_exist' => 57, 'soundcloud_id' => 58, 'soundcloud_error_code' => 59, 'soundcloud_error_msg' => 60, 'soundcloud_link_to_file' => 61, ),
|
BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'gunid' => 1, 'name' => 2, 'mime' => 3, 'ftype' => 4, 'directory' => 5, 'filepath' => 6, 'state' => 7, 'currentlyaccessing' => 8, 'editedby' => 9, 'mtime' => 10, 'utime' => 11, 'lptime' => 12, 'md5' => 13, 'track_title' => 14, 'artist_name' => 15, 'bit_rate' => 16, 'sample_rate' => 17, 'format' => 18, 'length' => 19, 'album_title' => 20, 'genre' => 21, 'comments' => 22, 'year' => 23, 'track_number' => 24, 'channels' => 25, 'url' => 26, 'bpm' => 27, 'rating' => 28, 'encoded_by' => 29, 'disc_number' => 30, 'mood' => 31, 'label' => 32, 'composer' => 33, 'encoder' => 34, 'checksum' => 35, 'lyrics' => 36, 'orchestra' => 37, 'conductor' => 38, 'lyricist' => 39, 'original_lyricist' => 40, 'radio_station_name' => 41, 'info_url' => 42, 'artist_url' => 43, 'audio_source_url' => 44, 'radio_station_url' => 45, 'buy_this_url' => 46, 'isrc_number' => 47, 'catalog_number' => 48, 'original_artist' => 49, 'copyright' => 50, 'report_datetime' => 51, 'report_location' => 52, 'report_organization' => 53, 'subject' => 54, 'contributor' => 55, 'language' => 56, 'file_exists' => 57, 'soundcloud_id' => 58, 'soundcloud_error_code' => 59, 'soundcloud_error_msg' => 60, 'soundcloud_link_to_file' => 61, ),
|
||||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, )
|
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, )
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -382,7 +382,7 @@ abstract class BaseCcFilesPeer {
|
||||||
$criteria->addSelectColumn(CcFilesPeer::SUBJECT);
|
$criteria->addSelectColumn(CcFilesPeer::SUBJECT);
|
||||||
$criteria->addSelectColumn(CcFilesPeer::CONTRIBUTOR);
|
$criteria->addSelectColumn(CcFilesPeer::CONTRIBUTOR);
|
||||||
$criteria->addSelectColumn(CcFilesPeer::LANGUAGE);
|
$criteria->addSelectColumn(CcFilesPeer::LANGUAGE);
|
||||||
$criteria->addSelectColumn(CcFilesPeer::FILE_EXIST);
|
$criteria->addSelectColumn(CcFilesPeer::FILE_EXISTS);
|
||||||
$criteria->addSelectColumn(CcFilesPeer::SOUNDCLOUD_ID);
|
$criteria->addSelectColumn(CcFilesPeer::SOUNDCLOUD_ID);
|
||||||
$criteria->addSelectColumn(CcFilesPeer::SOUNDCLOUD_ERROR_CODE);
|
$criteria->addSelectColumn(CcFilesPeer::SOUNDCLOUD_ERROR_CODE);
|
||||||
$criteria->addSelectColumn(CcFilesPeer::SOUNDCLOUD_ERROR_MSG);
|
$criteria->addSelectColumn(CcFilesPeer::SOUNDCLOUD_ERROR_MSG);
|
||||||
|
@ -445,7 +445,7 @@ abstract class BaseCcFilesPeer {
|
||||||
$criteria->addSelectColumn($alias . '.SUBJECT');
|
$criteria->addSelectColumn($alias . '.SUBJECT');
|
||||||
$criteria->addSelectColumn($alias . '.CONTRIBUTOR');
|
$criteria->addSelectColumn($alias . '.CONTRIBUTOR');
|
||||||
$criteria->addSelectColumn($alias . '.LANGUAGE');
|
$criteria->addSelectColumn($alias . '.LANGUAGE');
|
||||||
$criteria->addSelectColumn($alias . '.FILE_EXIST');
|
$criteria->addSelectColumn($alias . '.FILE_EXISTS');
|
||||||
$criteria->addSelectColumn($alias . '.SOUNDCLOUD_ID');
|
$criteria->addSelectColumn($alias . '.SOUNDCLOUD_ID');
|
||||||
$criteria->addSelectColumn($alias . '.SOUNDCLOUD_ERROR_CODE');
|
$criteria->addSelectColumn($alias . '.SOUNDCLOUD_ERROR_CODE');
|
||||||
$criteria->addSelectColumn($alias . '.SOUNDCLOUD_ERROR_MSG');
|
$criteria->addSelectColumn($alias . '.SOUNDCLOUD_ERROR_MSG');
|
||||||
|
|
|
@ -63,7 +63,7 @@
|
||||||
* @method CcFilesQuery orderByDbSubject($order = Criteria::ASC) Order by the subject column
|
* @method CcFilesQuery orderByDbSubject($order = Criteria::ASC) Order by the subject column
|
||||||
* @method CcFilesQuery orderByDbContributor($order = Criteria::ASC) Order by the contributor column
|
* @method CcFilesQuery orderByDbContributor($order = Criteria::ASC) Order by the contributor column
|
||||||
* @method CcFilesQuery orderByDbLanguage($order = Criteria::ASC) Order by the language column
|
* @method CcFilesQuery orderByDbLanguage($order = Criteria::ASC) Order by the language column
|
||||||
* @method CcFilesQuery orderByDbFileExist($order = Criteria::ASC) Order by the file_exist column
|
* @method CcFilesQuery orderByDbFileExists($order = Criteria::ASC) Order by the file_exists column
|
||||||
* @method CcFilesQuery orderByDbSoundcloudId($order = Criteria::ASC) Order by the soundcloud_id column
|
* @method CcFilesQuery orderByDbSoundcloudId($order = Criteria::ASC) Order by the soundcloud_id column
|
||||||
* @method CcFilesQuery orderByDbSoundcloudErrorCode($order = Criteria::ASC) Order by the soundcloud_error_code column
|
* @method CcFilesQuery orderByDbSoundcloudErrorCode($order = Criteria::ASC) Order by the soundcloud_error_code column
|
||||||
* @method CcFilesQuery orderByDbSoundcloudErrorMsg($order = Criteria::ASC) Order by the soundcloud_error_msg column
|
* @method CcFilesQuery orderByDbSoundcloudErrorMsg($order = Criteria::ASC) Order by the soundcloud_error_msg column
|
||||||
|
@ -126,7 +126,7 @@
|
||||||
* @method CcFilesQuery groupByDbSubject() Group by the subject column
|
* @method CcFilesQuery groupByDbSubject() Group by the subject column
|
||||||
* @method CcFilesQuery groupByDbContributor() Group by the contributor column
|
* @method CcFilesQuery groupByDbContributor() Group by the contributor column
|
||||||
* @method CcFilesQuery groupByDbLanguage() Group by the language column
|
* @method CcFilesQuery groupByDbLanguage() Group by the language column
|
||||||
* @method CcFilesQuery groupByDbFileExist() Group by the file_exist column
|
* @method CcFilesQuery groupByDbFileExists() Group by the file_exists column
|
||||||
* @method CcFilesQuery groupByDbSoundcloudId() Group by the soundcloud_id column
|
* @method CcFilesQuery groupByDbSoundcloudId() Group by the soundcloud_id column
|
||||||
* @method CcFilesQuery groupByDbSoundcloudErrorCode() Group by the soundcloud_error_code column
|
* @method CcFilesQuery groupByDbSoundcloudErrorCode() Group by the soundcloud_error_code column
|
||||||
* @method CcFilesQuery groupByDbSoundcloudErrorMsg() Group by the soundcloud_error_msg column
|
* @method CcFilesQuery groupByDbSoundcloudErrorMsg() Group by the soundcloud_error_msg column
|
||||||
|
@ -216,7 +216,7 @@
|
||||||
* @method CcFiles findOneByDbSubject(string $subject) Return the first CcFiles filtered by the subject column
|
* @method CcFiles findOneByDbSubject(string $subject) Return the first CcFiles filtered by the subject column
|
||||||
* @method CcFiles findOneByDbContributor(string $contributor) Return the first CcFiles filtered by the contributor column
|
* @method CcFiles findOneByDbContributor(string $contributor) Return the first CcFiles filtered by the contributor column
|
||||||
* @method CcFiles findOneByDbLanguage(string $language) Return the first CcFiles filtered by the language column
|
* @method CcFiles findOneByDbLanguage(string $language) Return the first CcFiles filtered by the language column
|
||||||
* @method CcFiles findOneByDbFileExist(boolean $file_exist) Return the first CcFiles filtered by the file_exist column
|
* @method CcFiles findOneByDbFileExists(boolean $file_exists) Return the first CcFiles filtered by the file_exists column
|
||||||
* @method CcFiles findOneByDbSoundcloudId(int $soundcloud_id) Return the first CcFiles filtered by the soundcloud_id column
|
* @method CcFiles findOneByDbSoundcloudId(int $soundcloud_id) Return the first CcFiles filtered by the soundcloud_id column
|
||||||
* @method CcFiles findOneByDbSoundcloudErrorCode(int $soundcloud_error_code) Return the first CcFiles filtered by the soundcloud_error_code column
|
* @method CcFiles findOneByDbSoundcloudErrorCode(int $soundcloud_error_code) Return the first CcFiles filtered by the soundcloud_error_code column
|
||||||
* @method CcFiles findOneByDbSoundcloudErrorMsg(string $soundcloud_error_msg) Return the first CcFiles filtered by the soundcloud_error_msg column
|
* @method CcFiles findOneByDbSoundcloudErrorMsg(string $soundcloud_error_msg) Return the first CcFiles filtered by the soundcloud_error_msg column
|
||||||
|
@ -279,7 +279,7 @@
|
||||||
* @method array findByDbSubject(string $subject) Return CcFiles objects filtered by the subject column
|
* @method array findByDbSubject(string $subject) Return CcFiles objects filtered by the subject column
|
||||||
* @method array findByDbContributor(string $contributor) Return CcFiles objects filtered by the contributor column
|
* @method array findByDbContributor(string $contributor) Return CcFiles objects filtered by the contributor column
|
||||||
* @method array findByDbLanguage(string $language) Return CcFiles objects filtered by the language column
|
* @method array findByDbLanguage(string $language) Return CcFiles objects filtered by the language column
|
||||||
* @method array findByDbFileExist(boolean $file_exist) Return CcFiles objects filtered by the file_exist column
|
* @method array findByDbFileExists(boolean $file_exists) Return CcFiles objects filtered by the file_exists column
|
||||||
* @method array findByDbSoundcloudId(int $soundcloud_id) Return CcFiles objects filtered by the soundcloud_id column
|
* @method array findByDbSoundcloudId(int $soundcloud_id) Return CcFiles objects filtered by the soundcloud_id column
|
||||||
* @method array findByDbSoundcloudErrorCode(int $soundcloud_error_code) Return CcFiles objects filtered by the soundcloud_error_code column
|
* @method array findByDbSoundcloudErrorCode(int $soundcloud_error_code) Return CcFiles objects filtered by the soundcloud_error_code column
|
||||||
* @method array findByDbSoundcloudErrorMsg(string $soundcloud_error_msg) Return CcFiles objects filtered by the soundcloud_error_msg column
|
* @method array findByDbSoundcloudErrorMsg(string $soundcloud_error_msg) Return CcFiles objects filtered by the soundcloud_error_msg column
|
||||||
|
@ -1724,20 +1724,20 @@ abstract class BaseCcFilesQuery extends ModelCriteria
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter the query on the file_exist column
|
* Filter the query on the file_exists column
|
||||||
*
|
*
|
||||||
* @param boolean|string $dbFileExist The value to use as filter.
|
* @param boolean|string $dbFileExists The value to use as filter.
|
||||||
* Accepts strings ('false', 'off', '-', 'no', 'n', and '0' are false, the rest is true)
|
* Accepts strings ('false', 'off', '-', 'no', 'n', and '0' are false, the rest is true)
|
||||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
*
|
*
|
||||||
* @return CcFilesQuery The current query, for fluid interface
|
* @return CcFilesQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function filterByDbFileExist($dbFileExist = null, $comparison = null)
|
public function filterByDbFileExists($dbFileExists = null, $comparison = null)
|
||||||
{
|
{
|
||||||
if (is_string($dbFileExist)) {
|
if (is_string($dbFileExists)) {
|
||||||
$file_exist = in_array(strtolower($dbFileExist), array('false', 'off', '-', 'no', 'n', '0')) ? false : true;
|
$file_exists = in_array(strtolower($dbFileExists), array('false', 'off', '-', 'no', 'n', '0')) ? false : true;
|
||||||
}
|
}
|
||||||
return $this->addUsingAlias(CcFilesPeer::FILE_EXIST, $dbFileExist, $comparison);
|
return $this->addUsingAlias(CcFilesPeer::FILE_EXISTS, $dbFileExists, $comparison);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -50,11 +50,11 @@ abstract class BaseCcMusicDirs extends BaseObject implements Persistent
|
||||||
protected $exists;
|
protected $exists;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The value for the removed field.
|
* The value for the watched field.
|
||||||
* Note: this column has a database default value of: false
|
* Note: this column has a database default value of: true
|
||||||
* @var boolean
|
* @var boolean
|
||||||
*/
|
*/
|
||||||
protected $removed;
|
protected $watched;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var array CcFiles[] Collection to store aggregation of CcFiles objects.
|
* @var array CcFiles[] Collection to store aggregation of CcFiles objects.
|
||||||
|
@ -84,7 +84,7 @@ abstract class BaseCcMusicDirs extends BaseObject implements Persistent
|
||||||
public function applyDefaultValues()
|
public function applyDefaultValues()
|
||||||
{
|
{
|
||||||
$this->exists = true;
|
$this->exists = true;
|
||||||
$this->removed = false;
|
$this->watched = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -138,13 +138,13 @@ abstract class BaseCcMusicDirs extends BaseObject implements Persistent
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the [removed] column value.
|
* Get the [watched] column value.
|
||||||
*
|
*
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public function getRemoved()
|
public function getWatched()
|
||||||
{
|
{
|
||||||
return $this->removed;
|
return $this->watched;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -228,24 +228,24 @@ abstract class BaseCcMusicDirs extends BaseObject implements Persistent
|
||||||
} // setExists()
|
} // setExists()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the value of [removed] column.
|
* Set the value of [watched] column.
|
||||||
*
|
*
|
||||||
* @param boolean $v new value
|
* @param boolean $v new value
|
||||||
* @return CcMusicDirs The current object (for fluent API support)
|
* @return CcMusicDirs The current object (for fluent API support)
|
||||||
*/
|
*/
|
||||||
public function setRemoved($v)
|
public function setWatched($v)
|
||||||
{
|
{
|
||||||
if ($v !== null) {
|
if ($v !== null) {
|
||||||
$v = (boolean) $v;
|
$v = (boolean) $v;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->removed !== $v || $this->isNew()) {
|
if ($this->watched !== $v || $this->isNew()) {
|
||||||
$this->removed = $v;
|
$this->watched = $v;
|
||||||
$this->modifiedColumns[] = CcMusicDirsPeer::REMOVED;
|
$this->modifiedColumns[] = CcMusicDirsPeer::WATCHED;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
} // setRemoved()
|
} // setWatched()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates whether the columns in this object are only set to default values.
|
* Indicates whether the columns in this object are only set to default values.
|
||||||
|
@ -261,7 +261,7 @@ abstract class BaseCcMusicDirs extends BaseObject implements Persistent
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->removed !== false) {
|
if ($this->watched !== true) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -291,7 +291,7 @@ abstract class BaseCcMusicDirs extends BaseObject implements Persistent
|
||||||
$this->directory = ($row[$startcol + 1] !== null) ? (string) $row[$startcol + 1] : null;
|
$this->directory = ($row[$startcol + 1] !== null) ? (string) $row[$startcol + 1] : null;
|
||||||
$this->type = ($row[$startcol + 2] !== null) ? (string) $row[$startcol + 2] : null;
|
$this->type = ($row[$startcol + 2] !== null) ? (string) $row[$startcol + 2] : null;
|
||||||
$this->exists = ($row[$startcol + 3] !== null) ? (boolean) $row[$startcol + 3] : null;
|
$this->exists = ($row[$startcol + 3] !== null) ? (boolean) $row[$startcol + 3] : null;
|
||||||
$this->removed = ($row[$startcol + 4] !== null) ? (boolean) $row[$startcol + 4] : null;
|
$this->watched = ($row[$startcol + 4] !== null) ? (boolean) $row[$startcol + 4] : null;
|
||||||
$this->resetModified();
|
$this->resetModified();
|
||||||
|
|
||||||
$this->setNew(false);
|
$this->setNew(false);
|
||||||
|
@ -630,7 +630,7 @@ abstract class BaseCcMusicDirs extends BaseObject implements Persistent
|
||||||
return $this->getExists();
|
return $this->getExists();
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
return $this->getRemoved();
|
return $this->getWatched();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
|
@ -659,7 +659,7 @@ abstract class BaseCcMusicDirs extends BaseObject implements Persistent
|
||||||
$keys[1] => $this->getDirectory(),
|
$keys[1] => $this->getDirectory(),
|
||||||
$keys[2] => $this->getType(),
|
$keys[2] => $this->getType(),
|
||||||
$keys[3] => $this->getExists(),
|
$keys[3] => $this->getExists(),
|
||||||
$keys[4] => $this->getRemoved(),
|
$keys[4] => $this->getWatched(),
|
||||||
);
|
);
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
@ -704,7 +704,7 @@ abstract class BaseCcMusicDirs extends BaseObject implements Persistent
|
||||||
$this->setExists($value);
|
$this->setExists($value);
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
$this->setRemoved($value);
|
$this->setWatched($value);
|
||||||
break;
|
break;
|
||||||
} // switch()
|
} // switch()
|
||||||
}
|
}
|
||||||
|
@ -734,7 +734,7 @@ abstract class BaseCcMusicDirs extends BaseObject implements Persistent
|
||||||
if (array_key_exists($keys[1], $arr)) $this->setDirectory($arr[$keys[1]]);
|
if (array_key_exists($keys[1], $arr)) $this->setDirectory($arr[$keys[1]]);
|
||||||
if (array_key_exists($keys[2], $arr)) $this->setType($arr[$keys[2]]);
|
if (array_key_exists($keys[2], $arr)) $this->setType($arr[$keys[2]]);
|
||||||
if (array_key_exists($keys[3], $arr)) $this->setExists($arr[$keys[3]]);
|
if (array_key_exists($keys[3], $arr)) $this->setExists($arr[$keys[3]]);
|
||||||
if (array_key_exists($keys[4], $arr)) $this->setRemoved($arr[$keys[4]]);
|
if (array_key_exists($keys[4], $arr)) $this->setWatched($arr[$keys[4]]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -750,7 +750,7 @@ abstract class BaseCcMusicDirs extends BaseObject implements Persistent
|
||||||
if ($this->isColumnModified(CcMusicDirsPeer::DIRECTORY)) $criteria->add(CcMusicDirsPeer::DIRECTORY, $this->directory);
|
if ($this->isColumnModified(CcMusicDirsPeer::DIRECTORY)) $criteria->add(CcMusicDirsPeer::DIRECTORY, $this->directory);
|
||||||
if ($this->isColumnModified(CcMusicDirsPeer::TYPE)) $criteria->add(CcMusicDirsPeer::TYPE, $this->type);
|
if ($this->isColumnModified(CcMusicDirsPeer::TYPE)) $criteria->add(CcMusicDirsPeer::TYPE, $this->type);
|
||||||
if ($this->isColumnModified(CcMusicDirsPeer::EXISTS)) $criteria->add(CcMusicDirsPeer::EXISTS, $this->exists);
|
if ($this->isColumnModified(CcMusicDirsPeer::EXISTS)) $criteria->add(CcMusicDirsPeer::EXISTS, $this->exists);
|
||||||
if ($this->isColumnModified(CcMusicDirsPeer::REMOVED)) $criteria->add(CcMusicDirsPeer::REMOVED, $this->removed);
|
if ($this->isColumnModified(CcMusicDirsPeer::WATCHED)) $criteria->add(CcMusicDirsPeer::WATCHED, $this->watched);
|
||||||
|
|
||||||
return $criteria;
|
return $criteria;
|
||||||
}
|
}
|
||||||
|
@ -815,7 +815,7 @@ abstract class BaseCcMusicDirs extends BaseObject implements Persistent
|
||||||
$copyObj->setDirectory($this->directory);
|
$copyObj->setDirectory($this->directory);
|
||||||
$copyObj->setType($this->type);
|
$copyObj->setType($this->type);
|
||||||
$copyObj->setExists($this->exists);
|
$copyObj->setExists($this->exists);
|
||||||
$copyObj->setRemoved($this->removed);
|
$copyObj->setWatched($this->watched);
|
||||||
|
|
||||||
if ($deepCopy) {
|
if ($deepCopy) {
|
||||||
// important: temporarily setNew(false) because this affects the behavior of
|
// important: temporarily setNew(false) because this affects the behavior of
|
||||||
|
@ -1016,7 +1016,7 @@ abstract class BaseCcMusicDirs extends BaseObject implements Persistent
|
||||||
$this->directory = null;
|
$this->directory = null;
|
||||||
$this->type = null;
|
$this->type = null;
|
||||||
$this->exists = null;
|
$this->exists = null;
|
||||||
$this->removed = null;
|
$this->watched = null;
|
||||||
$this->alreadyInSave = false;
|
$this->alreadyInSave = false;
|
||||||
$this->alreadyInValidation = false;
|
$this->alreadyInValidation = false;
|
||||||
$this->clearAllReferences();
|
$this->clearAllReferences();
|
||||||
|
|
|
@ -43,8 +43,8 @@ abstract class BaseCcMusicDirsPeer {
|
||||||
/** the column name for the EXISTS field */
|
/** the column name for the EXISTS field */
|
||||||
const EXISTS = 'cc_music_dirs.EXISTS';
|
const EXISTS = 'cc_music_dirs.EXISTS';
|
||||||
|
|
||||||
/** the column name for the REMOVED field */
|
/** the column name for the WATCHED field */
|
||||||
const REMOVED = 'cc_music_dirs.REMOVED';
|
const WATCHED = 'cc_music_dirs.WATCHED';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An identiy map to hold any loaded instances of CcMusicDirs objects.
|
* An identiy map to hold any loaded instances of CcMusicDirs objects.
|
||||||
|
@ -62,11 +62,11 @@ abstract class BaseCcMusicDirsPeer {
|
||||||
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
||||||
*/
|
*/
|
||||||
private static $fieldNames = array (
|
private static $fieldNames = array (
|
||||||
BasePeer::TYPE_PHPNAME => array ('Id', 'Directory', 'Type', 'Exists', 'Removed', ),
|
BasePeer::TYPE_PHPNAME => array ('Id', 'Directory', 'Type', 'Exists', 'Watched', ),
|
||||||
BasePeer::TYPE_STUDLYPHPNAME => array ('id', 'directory', 'type', 'exists', 'removed', ),
|
BasePeer::TYPE_STUDLYPHPNAME => array ('id', 'directory', 'type', 'exists', 'watched', ),
|
||||||
BasePeer::TYPE_COLNAME => array (self::ID, self::DIRECTORY, self::TYPE, self::EXISTS, self::REMOVED, ),
|
BasePeer::TYPE_COLNAME => array (self::ID, self::DIRECTORY, self::TYPE, self::EXISTS, self::WATCHED, ),
|
||||||
BasePeer::TYPE_RAW_COLNAME => array ('ID', 'DIRECTORY', 'TYPE', 'EXISTS', 'REMOVED', ),
|
BasePeer::TYPE_RAW_COLNAME => array ('ID', 'DIRECTORY', 'TYPE', 'EXISTS', 'WATCHED', ),
|
||||||
BasePeer::TYPE_FIELDNAME => array ('id', 'directory', 'type', 'exists', 'removed', ),
|
BasePeer::TYPE_FIELDNAME => array ('id', 'directory', 'type', 'exists', 'watched', ),
|
||||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, )
|
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, )
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -77,11 +77,11 @@ abstract class BaseCcMusicDirsPeer {
|
||||||
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
|
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
|
||||||
*/
|
*/
|
||||||
private static $fieldKeys = array (
|
private static $fieldKeys = array (
|
||||||
BasePeer::TYPE_PHPNAME => array ('Id' => 0, 'Directory' => 1, 'Type' => 2, 'Exists' => 3, 'Removed' => 4, ),
|
BasePeer::TYPE_PHPNAME => array ('Id' => 0, 'Directory' => 1, 'Type' => 2, 'Exists' => 3, 'Watched' => 4, ),
|
||||||
BasePeer::TYPE_STUDLYPHPNAME => array ('id' => 0, 'directory' => 1, 'type' => 2, 'exists' => 3, 'removed' => 4, ),
|
BasePeer::TYPE_STUDLYPHPNAME => array ('id' => 0, 'directory' => 1, 'type' => 2, 'exists' => 3, 'watched' => 4, ),
|
||||||
BasePeer::TYPE_COLNAME => array (self::ID => 0, self::DIRECTORY => 1, self::TYPE => 2, self::EXISTS => 3, self::REMOVED => 4, ),
|
BasePeer::TYPE_COLNAME => array (self::ID => 0, self::DIRECTORY => 1, self::TYPE => 2, self::EXISTS => 3, self::WATCHED => 4, ),
|
||||||
BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'DIRECTORY' => 1, 'TYPE' => 2, 'EXISTS' => 3, 'REMOVED' => 4, ),
|
BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'DIRECTORY' => 1, 'TYPE' => 2, 'EXISTS' => 3, 'WATCHED' => 4, ),
|
||||||
BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'directory' => 1, 'type' => 2, 'exists' => 3, 'removed' => 4, ),
|
BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'directory' => 1, 'type' => 2, 'exists' => 3, 'watched' => 4, ),
|
||||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, )
|
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, )
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -158,13 +158,13 @@ abstract class BaseCcMusicDirsPeer {
|
||||||
$criteria->addSelectColumn(CcMusicDirsPeer::DIRECTORY);
|
$criteria->addSelectColumn(CcMusicDirsPeer::DIRECTORY);
|
||||||
$criteria->addSelectColumn(CcMusicDirsPeer::TYPE);
|
$criteria->addSelectColumn(CcMusicDirsPeer::TYPE);
|
||||||
$criteria->addSelectColumn(CcMusicDirsPeer::EXISTS);
|
$criteria->addSelectColumn(CcMusicDirsPeer::EXISTS);
|
||||||
$criteria->addSelectColumn(CcMusicDirsPeer::REMOVED);
|
$criteria->addSelectColumn(CcMusicDirsPeer::WATCHED);
|
||||||
} else {
|
} else {
|
||||||
$criteria->addSelectColumn($alias . '.ID');
|
$criteria->addSelectColumn($alias . '.ID');
|
||||||
$criteria->addSelectColumn($alias . '.DIRECTORY');
|
$criteria->addSelectColumn($alias . '.DIRECTORY');
|
||||||
$criteria->addSelectColumn($alias . '.TYPE');
|
$criteria->addSelectColumn($alias . '.TYPE');
|
||||||
$criteria->addSelectColumn($alias . '.EXISTS');
|
$criteria->addSelectColumn($alias . '.EXISTS');
|
||||||
$criteria->addSelectColumn($alias . '.REMOVED');
|
$criteria->addSelectColumn($alias . '.WATCHED');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,13 +10,13 @@
|
||||||
* @method CcMusicDirsQuery orderByDirectory($order = Criteria::ASC) Order by the directory column
|
* @method CcMusicDirsQuery orderByDirectory($order = Criteria::ASC) Order by the directory column
|
||||||
* @method CcMusicDirsQuery orderByType($order = Criteria::ASC) Order by the type column
|
* @method CcMusicDirsQuery orderByType($order = Criteria::ASC) Order by the type column
|
||||||
* @method CcMusicDirsQuery orderByExists($order = Criteria::ASC) Order by the exists column
|
* @method CcMusicDirsQuery orderByExists($order = Criteria::ASC) Order by the exists column
|
||||||
* @method CcMusicDirsQuery orderByRemoved($order = Criteria::ASC) Order by the removed column
|
* @method CcMusicDirsQuery orderByWatched($order = Criteria::ASC) Order by the watched column
|
||||||
*
|
*
|
||||||
* @method CcMusicDirsQuery groupById() Group by the id column
|
* @method CcMusicDirsQuery groupById() Group by the id column
|
||||||
* @method CcMusicDirsQuery groupByDirectory() Group by the directory column
|
* @method CcMusicDirsQuery groupByDirectory() Group by the directory column
|
||||||
* @method CcMusicDirsQuery groupByType() Group by the type column
|
* @method CcMusicDirsQuery groupByType() Group by the type column
|
||||||
* @method CcMusicDirsQuery groupByExists() Group by the exists column
|
* @method CcMusicDirsQuery groupByExists() Group by the exists column
|
||||||
* @method CcMusicDirsQuery groupByRemoved() Group by the removed column
|
* @method CcMusicDirsQuery groupByWatched() Group by the watched column
|
||||||
*
|
*
|
||||||
* @method CcMusicDirsQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
|
* @method CcMusicDirsQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
|
||||||
* @method CcMusicDirsQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
|
* @method CcMusicDirsQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
|
||||||
|
@ -33,13 +33,13 @@
|
||||||
* @method CcMusicDirs findOneByDirectory(string $directory) Return the first CcMusicDirs filtered by the directory column
|
* @method CcMusicDirs findOneByDirectory(string $directory) Return the first CcMusicDirs filtered by the directory column
|
||||||
* @method CcMusicDirs findOneByType(string $type) Return the first CcMusicDirs filtered by the type column
|
* @method CcMusicDirs findOneByType(string $type) Return the first CcMusicDirs filtered by the type column
|
||||||
* @method CcMusicDirs findOneByExists(boolean $exists) Return the first CcMusicDirs filtered by the exists column
|
* @method CcMusicDirs findOneByExists(boolean $exists) Return the first CcMusicDirs filtered by the exists column
|
||||||
* @method CcMusicDirs findOneByRemoved(boolean $removed) Return the first CcMusicDirs filtered by the removed column
|
* @method CcMusicDirs findOneByWatched(boolean $watched) Return the first CcMusicDirs filtered by the watched column
|
||||||
*
|
*
|
||||||
* @method array findById(int $id) Return CcMusicDirs objects filtered by the id column
|
* @method array findById(int $id) Return CcMusicDirs objects filtered by the id column
|
||||||
* @method array findByDirectory(string $directory) Return CcMusicDirs objects filtered by the directory column
|
* @method array findByDirectory(string $directory) Return CcMusicDirs objects filtered by the directory column
|
||||||
* @method array findByType(string $type) Return CcMusicDirs objects filtered by the type column
|
* @method array findByType(string $type) Return CcMusicDirs objects filtered by the type column
|
||||||
* @method array findByExists(boolean $exists) Return CcMusicDirs objects filtered by the exists column
|
* @method array findByExists(boolean $exists) Return CcMusicDirs objects filtered by the exists column
|
||||||
* @method array findByRemoved(boolean $removed) Return CcMusicDirs objects filtered by the removed column
|
* @method array findByWatched(boolean $watched) Return CcMusicDirs objects filtered by the watched column
|
||||||
*
|
*
|
||||||
* @package propel.generator.airtime.om
|
* @package propel.generator.airtime.om
|
||||||
*/
|
*/
|
||||||
|
@ -228,20 +228,20 @@ abstract class BaseCcMusicDirsQuery extends ModelCriteria
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter the query on the removed column
|
* Filter the query on the watched column
|
||||||
*
|
*
|
||||||
* @param boolean|string $removed The value to use as filter.
|
* @param boolean|string $watched The value to use as filter.
|
||||||
* Accepts strings ('false', 'off', '-', 'no', 'n', and '0' are false, the rest is true)
|
* Accepts strings ('false', 'off', '-', 'no', 'n', and '0' are false, the rest is true)
|
||||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
*
|
*
|
||||||
* @return CcMusicDirsQuery The current query, for fluid interface
|
* @return CcMusicDirsQuery The current query, for fluid interface
|
||||||
*/
|
*/
|
||||||
public function filterByRemoved($removed = null, $comparison = null)
|
public function filterByWatched($watched = null, $comparison = null)
|
||||||
{
|
{
|
||||||
if (is_string($removed)) {
|
if (is_string($watched)) {
|
||||||
$removed = in_array(strtolower($removed), array('false', 'off', '-', 'no', 'n', '0')) ? false : true;
|
$watched = in_array(strtolower($watched), array('false', 'off', '-', 'no', 'n', '0')) ? false : true;
|
||||||
}
|
}
|
||||||
return $this->addUsingAlias(CcMusicDirsPeer::REMOVED, $removed, $comparison);
|
return $this->addUsingAlias(CcMusicDirsPeer::WATCHED, $watched, $comparison);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -33,12 +33,12 @@
|
||||||
</ul>
|
</ul>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</dd>
|
</dd>
|
||||||
<?php $watched_dirs = Application_Model_MusicDir::getWatchedDirs(null, false); ?>
|
<?php $watched_dirs = Application_Model_MusicDir::getWatchedDirs(null, true); ?>
|
||||||
|
|
||||||
<?php if (count($watched_dirs) > 0): ?>
|
<?php if (count($watched_dirs) > 0): ?>
|
||||||
<?php foreach($watched_dirs as $watched_dir): ?>
|
<?php foreach($watched_dirs as $watched_dir): ?>
|
||||||
<dd class="block-display selected-item">
|
<dd class="block-display selected-item">
|
||||||
<span><?php echo $watched_dir->getDirectory(); echo " -- Exsits? "; echo ($watched_dir->getExistsFlag())?"YES":"NO";?></span><span class="ui-icon ui-icon-close"></span>
|
<span><?php echo "< Exists? "; echo ($watched_dir->getExistsFlag())?"YES > : ":"NO > : ";?></span><span><?php echo $watched_dir->getDirectory();?></span></span><span class="ui-icon ui-icon-close"></span>
|
||||||
</dd>
|
</dd>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
|
|
|
@ -17,7 +17,7 @@ if (count($items)) : ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-row">
|
<div class="text-row">
|
||||||
<span class="spl_artist"><?php echo $item["CcFiles"]['artist_name'] ?></span>
|
<span class="spl_artist"><?php echo $item["CcFiles"]['artist_name'] ?></span>
|
||||||
<span class="spl_artist"><?php echo ($item["CcFiles"]['file_exist'])?"":"NO FILE FOUND!" ?></span>
|
<span class="spl_artist"><?php echo ($item["CcFiles"]['file_exists'])?"":"NO FILE FOUND!" ?></span>
|
||||||
<span class="spl_offset"><?php echo $item["offset"]?></span>
|
<span class="spl_offset"><?php echo $item["offset"]?></span>
|
||||||
</div>
|
</div>
|
||||||
<?php //create the crossfade icon.
|
<?php //create the crossfade icon.
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
<column name="directory" phpName="Directory" type="LONGVARCHAR" required="false"/>
|
<column name="directory" phpName="Directory" type="LONGVARCHAR" required="false"/>
|
||||||
<column name="type" phpName="Type" type="VARCHAR" size="255" required="false"/>
|
<column name="type" phpName="Type" type="VARCHAR" size="255" required="false"/>
|
||||||
<column name="exists" phpName="Exists" type="BOOLEAN" required="false" defaultValue="true"/>
|
<column name="exists" phpName="Exists" type="BOOLEAN" required="false" defaultValue="true"/>
|
||||||
<column name="removed" phpName="Removed" type="BOOLEAN" required="false" defaultValue="false"/>
|
<column name="watched" phpName="Watched" type="BOOLEAN" required="false" defaultValue="true"/>
|
||||||
<unique name="cc_music_dir_unique">
|
<unique name="cc_music_dir_unique">
|
||||||
<unique-column name="directory"/>
|
<unique-column name="directory"/>
|
||||||
</unique>
|
</unique>
|
||||||
|
@ -92,7 +92,7 @@
|
||||||
<column name="subject" phpName="DbSubject" type="VARCHAR" size="512" required="false"/>
|
<column name="subject" phpName="DbSubject" type="VARCHAR" size="512" required="false"/>
|
||||||
<column name="contributor" phpName="DbContributor" type="VARCHAR" size="512" required="false"/>
|
<column name="contributor" phpName="DbContributor" type="VARCHAR" size="512" required="false"/>
|
||||||
<column name="language" phpName="DbLanguage" type="VARCHAR" size="512" required="false"/>
|
<column name="language" phpName="DbLanguage" type="VARCHAR" size="512" required="false"/>
|
||||||
<column name="file_exist" phpName="DbFileExist" type="BOOLEAN" required="false" defaultValue="true"/>
|
<column name="file_exists" phpName="DbFileExists" type="BOOLEAN" required="false" defaultValue="true"/>
|
||||||
<column name="soundcloud_id" phpName="DbSoundcloudId" type="Integer" required="false"/>
|
<column name="soundcloud_id" phpName="DbSoundcloudId" type="Integer" required="false"/>
|
||||||
<column name="soundcloud_error_code" phpName="DbSoundcloudErrorCode" type="Integer" required="false"/>
|
<column name="soundcloud_error_code" phpName="DbSoundcloudErrorCode" type="Integer" required="false"/>
|
||||||
<column name="soundcloud_error_msg" phpName="DbSoundcloudErrorMsg" type="VARCHAR" size="512" required="false"/>
|
<column name="soundcloud_error_msg" phpName="DbSoundcloudErrorMsg" type="VARCHAR" size="512" required="false"/>
|
||||||
|
@ -112,6 +112,9 @@
|
||||||
<index name="cc_files_name_idx">
|
<index name="cc_files_name_idx">
|
||||||
<index-column name="name"/>
|
<index-column name="name"/>
|
||||||
</index>
|
</index>
|
||||||
|
<index name="cc_files_file_exists_idx">
|
||||||
|
<index-column name="file_exists"/>
|
||||||
|
</index>
|
||||||
</table>
|
</table>
|
||||||
<table name="cc_perms" phpName="CcPerms">
|
<table name="cc_perms" phpName="CcPerms">
|
||||||
<column name="permid" phpName="Permid" type="INTEGER" primaryKey="true" required="true"/>
|
<column name="permid" phpName="Permid" type="INTEGER" primaryKey="true" required="true"/>
|
||||||
|
|
|
@ -43,7 +43,7 @@ CREATE TABLE "cc_music_dirs"
|
||||||
"directory" TEXT,
|
"directory" TEXT,
|
||||||
"type" VARCHAR(255),
|
"type" VARCHAR(255),
|
||||||
"exists" BOOLEAN default 't',
|
"exists" BOOLEAN default 't',
|
||||||
"removed" BOOLEAN default 'f',
|
"watched" BOOLEAN default 't',
|
||||||
PRIMARY KEY ("id"),
|
PRIMARY KEY ("id"),
|
||||||
CONSTRAINT "cc_music_dir_unique" UNIQUE ("directory")
|
CONSTRAINT "cc_music_dir_unique" UNIQUE ("directory")
|
||||||
);
|
);
|
||||||
|
@ -118,7 +118,7 @@ CREATE TABLE "cc_files"
|
||||||
"subject" VARCHAR(512),
|
"subject" VARCHAR(512),
|
||||||
"contributor" VARCHAR(512),
|
"contributor" VARCHAR(512),
|
||||||
"language" VARCHAR(512),
|
"language" VARCHAR(512),
|
||||||
"file_exist" BOOLEAN default 't',
|
"file_exists" BOOLEAN default 't',
|
||||||
"soundcloud_id" INTEGER,
|
"soundcloud_id" INTEGER,
|
||||||
"soundcloud_error_code" INTEGER,
|
"soundcloud_error_code" INTEGER,
|
||||||
"soundcloud_error_msg" VARCHAR(512),
|
"soundcloud_error_msg" VARCHAR(512),
|
||||||
|
@ -135,6 +135,8 @@ CREATE INDEX "cc_files_md5_idx" ON "cc_files" ("md5");
|
||||||
|
|
||||||
CREATE INDEX "cc_files_name_idx" ON "cc_files" ("name");
|
CREATE INDEX "cc_files_name_idx" ON "cc_files" ("name");
|
||||||
|
|
||||||
|
CREATE INDEX "cc_files_file_exists_idx" ON "cc_files" ("file_exists");
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
||||||
-- cc_perms
|
-- cc_perms
|
||||||
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
||||||
|
|
|
@ -592,15 +592,18 @@ class AirTimeApiClient(ApiClientInterface):
|
||||||
"""
|
"""
|
||||||
This function updates status of mounted file system information on airtime
|
This function updates status of mounted file system information on airtime
|
||||||
"""
|
"""
|
||||||
def update_file_system_mount(self, mount_list):
|
def update_file_system_mount(self, added_dir, removed_dir):
|
||||||
logger = logging.getLogger()
|
logger = logging.getLogger()
|
||||||
try:
|
try:
|
||||||
url = "http://%s:%s/%s/%s" % (self.config["base_url"], str(self.config["base_port"]), self.config["api_base"], self.config["update_fs_mount"])
|
url = "http://%s:%s/%s/%s" % (self.config["base_url"], str(self.config["base_port"]), self.config["api_base"], self.config["update_fs_mount"])
|
||||||
|
|
||||||
url = url.replace("%%api_key%%", self.config["api_key"])
|
url = url.replace("%%api_key%%", self.config["api_key"])
|
||||||
|
|
||||||
data_string = string.join(mount_list, ',')
|
added_data_string = string.join(added_dir, ',')
|
||||||
map = [("mount_list", data_string)]
|
removed_data_string = string.join(removed_dir, ',')
|
||||||
|
|
||||||
|
map = [("added_dir", added_data_string),("removed_dir",removed_data_string)]
|
||||||
|
|
||||||
data = urllib.urlencode(map)
|
data = urllib.urlencode(map)
|
||||||
|
|
||||||
req = urllib2.Request(url, data)
|
req = urllib2.Request(url, data)
|
||||||
|
@ -614,7 +617,7 @@ class AirTimeApiClient(ApiClientInterface):
|
||||||
|
|
||||||
"""
|
"""
|
||||||
When watched dir is missing(unplugged or something) on boot up, this function will get called
|
When watched dir is missing(unplugged or something) on boot up, this function will get called
|
||||||
and will call approperiate function on Airtime.
|
and will call appropriate function on Airtime.
|
||||||
"""
|
"""
|
||||||
def handle_watched_dir_missing(self, dir):
|
def handle_watched_dir_missing(self, dir):
|
||||||
logger = logging.getLogger()
|
logger = logging.getLogger()
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import os
|
import os
|
||||||
import time
|
import time
|
||||||
import pyinotify
|
import pyinotify
|
||||||
|
import shutil
|
||||||
|
|
||||||
from subprocess import Popen, PIPE
|
from subprocess import Popen, PIPE
|
||||||
from api_clients import api_client
|
from api_clients import api_client
|
||||||
|
@ -22,8 +23,13 @@ class AirtimeMediaMonitorBootstrap():
|
||||||
self.wm = wm
|
self.wm = wm
|
||||||
# add /etc on watch list so we can detect mount
|
# add /etc on watch list so we can detect mount
|
||||||
self.mount_file = "/etc"
|
self.mount_file = "/etc"
|
||||||
|
self.curr_mtab_file = "/var/tmp/airtime/media-monitor/currMtab"
|
||||||
self.logger.info("Adding %s on watch list...", self.mount_file)
|
self.logger.info("Adding %s on watch list...", self.mount_file)
|
||||||
self.wm.add_watch(self.mount_file, pyinotify.ALL_EVENTS, rec=False, auto_add=False)
|
self.wm.add_watch(self.mount_file, pyinotify.ALL_EVENTS, rec=False, auto_add=False)
|
||||||
|
|
||||||
|
# create currMtab file if it's the first time
|
||||||
|
if not os.path.exists(self.curr_mtab_file):
|
||||||
|
shutil.copy('/etc/mtab', self.curr_mtab_file)
|
||||||
|
|
||||||
"""On bootup we want to scan all directories and look for files that
|
"""On bootup we want to scan all directories and look for files that
|
||||||
weren't there or files that changed before media-monitor process
|
weren't there or files that changed before media-monitor process
|
||||||
|
|
|
@ -2,6 +2,8 @@ import socket
|
||||||
import logging
|
import logging
|
||||||
import time
|
import time
|
||||||
import os
|
import os
|
||||||
|
import shutil
|
||||||
|
import difflib
|
||||||
|
|
||||||
import pyinotify
|
import pyinotify
|
||||||
from pyinotify import ProcessEvent
|
from pyinotify import ProcessEvent
|
||||||
|
@ -40,6 +42,8 @@ class AirtimeProcessEvent(ProcessEvent):
|
||||||
self.create_dict = {}
|
self.create_dict = {}
|
||||||
self.mount_file_dir = "/etc";
|
self.mount_file_dir = "/etc";
|
||||||
self.mount_file = "/etc/mtab";
|
self.mount_file = "/etc/mtab";
|
||||||
|
self.curr_mtab_file = "/var/tmp/airtime/media-monitor/currMtab"
|
||||||
|
self.prev_mtab_file = "/var/tmp/airtime/media-monitor/prevMtab"
|
||||||
|
|
||||||
def add_filepath_to_ignore(self, filepath):
|
def add_filepath_to_ignore(self, filepath):
|
||||||
self.ignore_event.add(filepath)
|
self.ignore_event.add(filepath)
|
||||||
|
@ -167,23 +171,33 @@ class AirtimeProcessEvent(ProcessEvent):
|
||||||
# if change is detected on /etc/mtab, we check what mount(file system) was added/removed
|
# if change is detected on /etc/mtab, we check what mount(file system) was added/removed
|
||||||
# and act accordingly
|
# and act accordingly
|
||||||
def handle_mount_change(self):
|
def handle_mount_change(self):
|
||||||
mount_list = [];
|
self.logger.info("Mount change detected, handling changes...");
|
||||||
# parse /etc/mtab
|
# take snapshot of mtab file and update currMtab and prevMtab
|
||||||
fh = open(self.mount_file, 'r')
|
# move currMtab to prevMtab and create new currMtab
|
||||||
while 1:
|
shutil.move(self.curr_mtab_file, self.prev_mtab_file)
|
||||||
line = fh.readline()
|
# create the file
|
||||||
if not line:
|
shutil.copy(self.mount_file, self.curr_mtab_file)
|
||||||
break
|
|
||||||
|
d = difflib.Differ()
|
||||||
line_info = line.split(' ')
|
curr_fh = open(self.curr_mtab_file, 'r')
|
||||||
# the line format is like following:
|
prev_fh = open(self.prev_mtab_file, 'r')
|
||||||
# /dev/sdg1 /media/809D-D2A1 vfat rw,nosuid,nodev,uhelper=udisks..........
|
|
||||||
# so we always get [1] after split to get the mount point
|
diff = list(d.compare(prev_fh.readlines(), curr_fh.readlines()))
|
||||||
mount_list.append(line_info[1])
|
added_mount_points = []
|
||||||
fh.close()
|
removed_mount_points = []
|
||||||
self.logger.info("Mount List: %s", mount_list)
|
|
||||||
|
for dir in diff:
|
||||||
|
info = dir.split(' ')
|
||||||
|
if info[0] == '+':
|
||||||
|
added_mount_points.append(info[2])
|
||||||
|
elif info[0] == '-':
|
||||||
|
removed_mount_points.append(info[2])
|
||||||
|
|
||||||
|
self.logger.info("added: %s", added_mount_points)
|
||||||
|
self.logger.info("removed: %s", removed_mount_points)
|
||||||
|
|
||||||
# send current mount information to Airtime
|
# send current mount information to Airtime
|
||||||
self.api_client.update_file_system_mount(mount_list);
|
self.api_client.update_file_system_mount(added_mount_points, removed_mount_points);
|
||||||
|
|
||||||
def handle_watched_dir_missing(self, dir):
|
def handle_watched_dir_missing(self, dir):
|
||||||
self.api_client.handle_watched_dir_missing(dir);
|
self.api_client.handle_watched_dir_missing(dir);
|
||||||
|
|
|
@ -10,7 +10,7 @@ import pyinotify
|
||||||
|
|
||||||
class MediaMonitorCommon:
|
class MediaMonitorCommon:
|
||||||
|
|
||||||
timestamp_file = "/var/tmp/airtime/last_index"
|
timestamp_file = "/var/tmp/airtime/media-monitor/last_index"
|
||||||
|
|
||||||
def __init__(self, airtime_config, wm=None):
|
def __init__(self, airtime_config, wm=None):
|
||||||
self.supported_file_formats = ['mp3', 'ogg']
|
self.supported_file_formats = ['mp3', 'ogg']
|
||||||
|
|
|
@ -6,7 +6,9 @@ if os.geteuid() != 0:
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
#create media-monitor dir under /var/tmp/airtime
|
||||||
|
if not os.path.exists("/var/tmp/airtime/media-monitor"):
|
||||||
|
os.makedirs("/var/tmp/airtime/media-monitor")
|
||||||
if os.environ["disable_auto_start_services"] == "f":
|
if os.environ["disable_auto_start_services"] == "f":
|
||||||
#update-rc.d init script
|
#update-rc.d init script
|
||||||
p = Popen("update-rc.d airtime-media-monitor defaults >/dev/null 2>&1", shell=True)
|
p = Popen("update-rc.d airtime-media-monitor defaults >/dev/null 2>&1", shell=True)
|
||||||
|
|
Loading…
Reference in New Issue