Added option to set media type for tracks.
This commit is contained in:
parent
2e23238f2c
commit
b411d6d6f2
17 changed files with 281 additions and 129 deletions
|
@ -294,6 +294,12 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
|||
*/
|
||||
protected $artwork;
|
||||
|
||||
/**
|
||||
* The value for the media_type field.
|
||||
* @var string
|
||||
*/
|
||||
protected $media_type;
|
||||
|
||||
/**
|
||||
* The value for the artist_url field.
|
||||
* @var string
|
||||
|
@ -1193,6 +1199,17 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
|||
return $this->artwork;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [media_type] column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getDbMediaType()
|
||||
{
|
||||
|
||||
return $this->media_type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [artist_url] column value.
|
||||
*
|
||||
|
@ -1875,6 +1892,26 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
|||
return $this;
|
||||
} // setDbArtwork()
|
||||
|
||||
/**
|
||||
* Set the value of [media_type] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return CcFiles The current object (for fluent API support)
|
||||
*/
|
||||
public function setDbMediaType($v)
|
||||
{
|
||||
if ($v !== null && is_numeric($v)) {
|
||||
$v = (string) $v;
|
||||
}
|
||||
|
||||
if ($this->media_type !== $v) {
|
||||
$this->media_type = $v;
|
||||
$this->modifiedColumns[] = CcFilesPeer::MEDIA_TYPE;
|
||||
}
|
||||
|
||||
return $this;
|
||||
} // setDbMediaType()
|
||||
|
||||
/**
|
||||
* Set the value of [artist_name] column.
|
||||
*
|
||||
|
@ -3304,6 +3341,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
|||
$this->filesize = ($row[$startcol + 70] !== null) ? (int) $row[$startcol + 70] : null;
|
||||
$this->description = ($row[$startcol + 71] !== null) ? (string) $row[$startcol + 71] : null;
|
||||
$this->artwork = ($row[$startcol + 72] !== null) ? (string) $row[$startcol + 72] : null;
|
||||
$this->media_type = ($row[$startcol + 73] !== null) ? (string) $row[$startcol + 73] : null;
|
||||
$this->resetModified();
|
||||
|
||||
$this->setNew(false);
|
||||
|
@ -3944,6 +3982,9 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
|||
if ($this->isColumnModified(CcFilesPeer::ARTWORK)) {
|
||||
$modifiedColumns[':p' . $index++] = '"artwork"';
|
||||
}
|
||||
if ($this->isColumnModified(CcFilesPeer::MEDIA_TYPE)) {
|
||||
$modifiedColumns[':p' . $index++] = '"media_type"';
|
||||
}
|
||||
|
||||
$sql = sprintf(
|
||||
'INSERT INTO "cc_files" (%s) VALUES (%s)',
|
||||
|
@ -4174,6 +4215,9 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
|||
case '"artwork"':
|
||||
$stmt->bindValue($identifier, $this->artwork, PDO::PARAM_STR);
|
||||
break;
|
||||
case '"media_type"':
|
||||
$stmt->bindValue($identifier, $this->media_type, PDO::PARAM_STR);
|
||||
break;
|
||||
}
|
||||
}
|
||||
$stmt->execute();
|
||||
|
@ -4608,6 +4652,9 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
|||
case 72:
|
||||
return $this->getDbArtwork();
|
||||
break;
|
||||
case 73:
|
||||
return $this->getDbMediaType();
|
||||
break;
|
||||
default:
|
||||
return null;
|
||||
break;
|
||||
|
@ -4710,6 +4757,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
|||
$keys[70] => $this->getDbFilesize(),
|
||||
$keys[71] => $this->getDbDescription(),
|
||||
$keys[72] => $this->getDbArtwork(),
|
||||
$keys[73] => $this->getDbMediaType(),
|
||||
);
|
||||
$virtualColumns = $this->virtualColumns;
|
||||
foreach ($virtualColumns as $key => $virtualColumn) {
|
||||
|
@ -5003,6 +5051,9 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
|||
case 72:
|
||||
$this->setDbArtwork($value);
|
||||
break;
|
||||
case 73:
|
||||
$this->setDbMediaType($value);
|
||||
break;
|
||||
} // switch()
|
||||
}
|
||||
|
||||
|
@ -5100,6 +5151,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
|||
if (array_key_exists($keys[70], $arr)) $this->setDbFilesize($arr[$keys[70]]);
|
||||
if (array_key_exists($keys[71], $arr)) $this->setDbDescription($arr[$keys[71]]);
|
||||
if (array_key_exists($keys[72], $arr)) $this->setDbArtwork($arr[$keys[72]]);
|
||||
if (array_key_exists($keys[73], $arr)) $this->setDbMediaType($arr[$keys[73]]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -5184,6 +5236,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
|||
if ($this->isColumnModified(CcFilesPeer::FILESIZE)) $criteria->add(CcFilesPeer::FILESIZE, $this->filesize);
|
||||
if ($this->isColumnModified(CcFilesPeer::DESCRIPTION)) $criteria->add(CcFilesPeer::DESCRIPTION, $this->description);
|
||||
if ($this->isColumnModified(CcFilesPeer::ARTWORK)) $criteria->add(CcFilesPeer::ARTWORK, $this->artwork);
|
||||
if ($this->isColumnModified(CcFilesPeer::MEDIA_TYPE)) $criteria->add(CcFilesPeer::MEDIA_TYPE, $this->media_type);
|
||||
|
||||
return $criteria;
|
||||
}
|
||||
|
@ -5319,6 +5372,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
|||
$copyObj->setDbFilesize($this->getDbFilesize());
|
||||
$copyObj->setDbDescription($this->getDbDescription());
|
||||
$copyObj->setDbArtwork($this->getDbArtwork());
|
||||
$copyObj->setDbMediaType($this->getDbMediaType());
|
||||
|
||||
if ($deepCopy && !$this->startCopy) {
|
||||
// important: temporarily setNew(false) because this affects the behavior of
|
||||
|
@ -7721,6 +7775,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
|||
$this->filesize = null;
|
||||
$this->description = null;
|
||||
$this->artwork = null;
|
||||
$this->media_type = null;
|
||||
$this->alreadyInSave = false;
|
||||
$this->alreadyInValidation = false;
|
||||
$this->alreadyInClearAllReferencesDeep = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue