CC-2301 : creating an offset column to help create crossfades in the playlist.
changing default fade to be a separate default fade in/out
This commit is contained in:
parent
ef100f89f1
commit
410d298272
14 changed files with 273 additions and 107 deletions
|
@ -43,7 +43,8 @@ class PreferenceController extends Zend_Controller_Action
|
|||
if ($form->isValid($values)) {
|
||||
|
||||
Application_Model_Preference::SetHeadTitle($values["stationName"], $this->view);
|
||||
Application_Model_Preference::SetDefaultFade($values["stationDefaultFade"]);
|
||||
Application_Model_Preference::SetDefaultFadeIn($values["stationDefaultFadeIn"]);
|
||||
Application_Model_Preference::SetDefaultFadeOut($values["stationDefaultFadeOut"]);
|
||||
Application_Model_Preference::SetAllow3rdPartyApi($values["thirdPartyApi"]);
|
||||
Application_Model_Preference::SetDefaultLocale($values["locale"]);
|
||||
Application_Model_Preference::SetDefaultTimezone($values["timezone"]);
|
||||
|
|
|
@ -12,10 +12,8 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm
|
|||
array('ViewScript', array('viewScript' => 'form/preferences_general.phtml'))
|
||||
));
|
||||
|
||||
$defaultFade = Application_Model_Preference::GetDefaultFade();
|
||||
if ($defaultFade == "") {
|
||||
$defaultFade = '0.5';
|
||||
}
|
||||
$defaultFadeIn = Application_Model_Preference::GetDefaultFadeIn();
|
||||
$defaultFadeOut = Application_Model_Preference::GetDefaultFadeOut();
|
||||
|
||||
//Station name
|
||||
$this->addElement('text', 'stationName', array(
|
||||
|
@ -29,10 +27,10 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm
|
|||
)
|
||||
));
|
||||
|
||||
//Default station fade
|
||||
$this->addElement('text', 'stationDefaultFade', array(
|
||||
//Default station fade in
|
||||
$this->addElement('text', 'stationDefaultFadeIn', array(
|
||||
'class' => 'input_text',
|
||||
'label' => _('Default Fade (s):'),
|
||||
'label' => _('Default Fade In (s):'),
|
||||
'required' => true,
|
||||
'filters' => array('StringTrim'),
|
||||
'validators' => array(
|
||||
|
@ -42,12 +40,31 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm
|
|||
'regex', false, array('/^[0-9]{1,2}(\.\d{1})?$/', 'messages' => _('enter a time in seconds 0{.0}'))
|
||||
)
|
||||
),
|
||||
'value' => $defaultFade,
|
||||
'value' => $defaultFadeIn,
|
||||
'decorators' => array(
|
||||
'ViewHelper'
|
||||
)
|
||||
));
|
||||
|
||||
//Default station fade out
|
||||
$this->addElement('text', 'stationDefaultFadeOut', array(
|
||||
'class' => 'input_text',
|
||||
'label' => _('Default Fade Out (s):'),
|
||||
'required' => true,
|
||||
'filters' => array('StringTrim'),
|
||||
'validators' => array(
|
||||
array(
|
||||
$rangeValidator,
|
||||
$notEmptyValidator,
|
||||
'regex', false, array('/^[0-9]{1,2}(\.\d{1})?$/', 'messages' => _('enter a time in seconds 0{.0}'))
|
||||
)
|
||||
),
|
||||
'value' => $defaultFadeOut,
|
||||
'decorators' => array(
|
||||
'ViewHelper'
|
||||
)
|
||||
));
|
||||
|
||||
$third_party_api = new Zend_Form_Element_Radio('thirdPartyApi');
|
||||
$third_party_api->setLabel(
|
||||
sprintf(_('Allow Remote Websites To Access "Schedule" Info?%s (Enable this to make front-end widgets work.)'), '<br>'));
|
||||
|
|
|
@ -99,13 +99,8 @@ class Application_Model_Block implements Application_Model_LibraryEditable
|
|||
$this->block->save();
|
||||
}
|
||||
|
||||
$defaultFade = Application_Model_Preference::GetDefaultFade();
|
||||
if ($defaultFade !== "") {
|
||||
//fade is in format SS.uuuuuu
|
||||
|
||||
$this->blockItem["fadein"] = $defaultFade;
|
||||
$this->blockItem["fadeout"] = $defaultFade;
|
||||
}
|
||||
$this->blockItem["fadein"] = Application_Model_Preference::GetDefaultFadeIn();
|
||||
$this->blockItem["fadeout"] = Application_Model_Preference::GetDefaultFadeOut();
|
||||
|
||||
$this->con = isset($con) ? $con : Propel::getConnection(CcBlockPeer::DATABASE_NAME);
|
||||
$this->id = $this->block->getDbId();
|
||||
|
@ -234,6 +229,12 @@ SQL;
|
|||
foreach ($rows as &$row) {
|
||||
|
||||
$clipSec = Application_Common_DateHelper::playlistTimeToSeconds($row['length']);
|
||||
|
||||
$row['trackSec'] = $clipSec;
|
||||
|
||||
$row['cueInSec'] = Application_Common_DateHelper::playlistTimeToSeconds($row['cuein']);
|
||||
$row['cueOutSec'] = Application_Common_DateHelper::playlistTimeToSeconds($row['cueout']);
|
||||
|
||||
$offset += $clipSec;
|
||||
$offset_cliplength = Application_Common_DateHelper::secondsToPlaylistTime($offset);
|
||||
|
||||
|
|
|
@ -60,13 +60,8 @@ class Application_Model_Playlist implements Application_Model_LibraryEditable
|
|||
$this->pl->save();
|
||||
}
|
||||
|
||||
$defaultFade = Application_Model_Preference::GetDefaultFade();
|
||||
if ($defaultFade !== "") {
|
||||
//fade is in format SS.uuuuuu
|
||||
|
||||
$this->plItem["fadein"] = $defaultFade;
|
||||
$this->plItem["fadeout"] = $defaultFade;
|
||||
}
|
||||
$this->plItem["fadein"] = Application_Model_Preference::GetDefaultFadeIn();
|
||||
$this->plItem["fadeout"] = Application_Model_Preference::GetDefaultFadeOut();
|
||||
|
||||
$this->con = isset($con) ? $con : Propel::getConnection(CcPlaylistPeer::DATABASE_NAME);
|
||||
$this->id = $this->pl->getDbId();
|
||||
|
|
|
@ -195,6 +195,40 @@ class Application_Model_Preference
|
|||
}
|
||||
}
|
||||
|
||||
public static function SetDefaultFadeIn($fade)
|
||||
{
|
||||
self::setValue("default_fade_in", $fade);
|
||||
}
|
||||
|
||||
public static function GetDefaultFadeIn()
|
||||
{
|
||||
$fade = self::getValue("default_fade_in");
|
||||
|
||||
if ($fade === "") {
|
||||
// the default value of the fade is 00.5
|
||||
return "00.5";
|
||||
}
|
||||
|
||||
return $fade;
|
||||
}
|
||||
|
||||
public static function SetDefaultFadeOut($fade)
|
||||
{
|
||||
self::setValue("default_fade_out", $fade);
|
||||
}
|
||||
|
||||
public static function GetDefaultFadeOut()
|
||||
{
|
||||
$fade = self::getValue("default_fade_out");
|
||||
|
||||
if ($fade === "") {
|
||||
// the default value of the fade is 00.5
|
||||
return "00.5";
|
||||
}
|
||||
|
||||
return $fade;
|
||||
}
|
||||
|
||||
public static function SetDefaultFade($fade)
|
||||
{
|
||||
self::setValue("default_fade", $fade);
|
||||
|
|
|
@ -45,6 +45,7 @@ class CcPlaylistcontentsTableMap extends TableMap {
|
|||
$this->addColumn('STREAM_ID', 'DbStreamId', 'INTEGER', false, null, null);
|
||||
$this->addColumn('TYPE', 'DbType', 'SMALLINT', true, null, 0);
|
||||
$this->addColumn('POSITION', 'DbPosition', 'INTEGER', false, null, null);
|
||||
$this->addColumn('OFFSET', 'DbOffset', 'REAL', true, null, 0);
|
||||
$this->addColumn('CLIPLENGTH', 'DbCliplength', 'VARCHAR', false, null, '00:00:00');
|
||||
$this->addColumn('CUEIN', 'DbCuein', 'VARCHAR', false, null, '00:00:00');
|
||||
$this->addColumn('CUEOUT', 'DbCueout', 'VARCHAR', false, null, '00:00:00');
|
||||
|
|
|
@ -67,6 +67,13 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
|
|||
*/
|
||||
protected $position;
|
||||
|
||||
/**
|
||||
* The value for the offset field.
|
||||
* Note: this column has a database default value of: 0
|
||||
* @var double
|
||||
*/
|
||||
protected $offset;
|
||||
|
||||
/**
|
||||
* The value for the cliplength field.
|
||||
* Note: this column has a database default value of: '00:00:00'
|
||||
|
@ -143,6 +150,7 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
|
|||
public function applyDefaultValues()
|
||||
{
|
||||
$this->type = 0;
|
||||
$this->offset = 0;
|
||||
$this->cliplength = '00:00:00';
|
||||
$this->cuein = '00:00:00';
|
||||
$this->cueout = '00:00:00';
|
||||
|
@ -230,6 +238,16 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
|
|||
return $this->position;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [offset] column value.
|
||||
*
|
||||
* @return double
|
||||
*/
|
||||
public function getDbOffset()
|
||||
{
|
||||
return $this->offset;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [cliplength] column value.
|
||||
*
|
||||
|
@ -478,6 +496,26 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
|
|||
return $this;
|
||||
} // setDbPosition()
|
||||
|
||||
/**
|
||||
* Set the value of [offset] column.
|
||||
*
|
||||
* @param double $v new value
|
||||
* @return CcPlaylistcontents The current object (for fluent API support)
|
||||
*/
|
||||
public function setDbOffset($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
$v = (double) $v;
|
||||
}
|
||||
|
||||
if ($this->offset !== $v || $this->isNew()) {
|
||||
$this->offset = $v;
|
||||
$this->modifiedColumns[] = CcPlaylistcontentsPeer::OFFSET;
|
||||
}
|
||||
|
||||
return $this;
|
||||
} // setDbOffset()
|
||||
|
||||
/**
|
||||
* Set the value of [cliplength] column.
|
||||
*
|
||||
|
@ -652,6 +690,10 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
|
|||
return false;
|
||||
}
|
||||
|
||||
if ($this->offset !== 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($this->cliplength !== '00:00:00') {
|
||||
return false;
|
||||
}
|
||||
|
@ -701,11 +743,12 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
|
|||
$this->stream_id = ($row[$startcol + 4] !== null) ? (int) $row[$startcol + 4] : null;
|
||||
$this->type = ($row[$startcol + 5] !== null) ? (int) $row[$startcol + 5] : null;
|
||||
$this->position = ($row[$startcol + 6] !== null) ? (int) $row[$startcol + 6] : null;
|
||||
$this->cliplength = ($row[$startcol + 7] !== null) ? (string) $row[$startcol + 7] : null;
|
||||
$this->cuein = ($row[$startcol + 8] !== null) ? (string) $row[$startcol + 8] : null;
|
||||
$this->cueout = ($row[$startcol + 9] !== null) ? (string) $row[$startcol + 9] : null;
|
||||
$this->fadein = ($row[$startcol + 10] !== null) ? (string) $row[$startcol + 10] : null;
|
||||
$this->fadeout = ($row[$startcol + 11] !== null) ? (string) $row[$startcol + 11] : null;
|
||||
$this->offset = ($row[$startcol + 7] !== null) ? (double) $row[$startcol + 7] : null;
|
||||
$this->cliplength = ($row[$startcol + 8] !== null) ? (string) $row[$startcol + 8] : null;
|
||||
$this->cuein = ($row[$startcol + 9] !== null) ? (string) $row[$startcol + 9] : null;
|
||||
$this->cueout = ($row[$startcol + 10] !== null) ? (string) $row[$startcol + 10] : null;
|
||||
$this->fadein = ($row[$startcol + 11] !== null) ? (string) $row[$startcol + 11] : null;
|
||||
$this->fadeout = ($row[$startcol + 12] !== null) ? (string) $row[$startcol + 12] : null;
|
||||
$this->resetModified();
|
||||
|
||||
$this->setNew(false);
|
||||
|
@ -714,7 +757,7 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
|
|||
$this->ensureConsistency();
|
||||
}
|
||||
|
||||
return $startcol + 12; // 12 = CcPlaylistcontentsPeer::NUM_COLUMNS - CcPlaylistcontentsPeer::NUM_LAZY_LOAD_COLUMNS).
|
||||
return $startcol + 13; // 13 = CcPlaylistcontentsPeer::NUM_COLUMNS - CcPlaylistcontentsPeer::NUM_LAZY_LOAD_COLUMNS).
|
||||
|
||||
} catch (Exception $e) {
|
||||
throw new PropelException("Error populating CcPlaylistcontents object", $e);
|
||||
|
@ -1099,18 +1142,21 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
|
|||
return $this->getDbPosition();
|
||||
break;
|
||||
case 7:
|
||||
return $this->getDbCliplength();
|
||||
return $this->getDbOffset();
|
||||
break;
|
||||
case 8:
|
||||
return $this->getDbCuein();
|
||||
return $this->getDbCliplength();
|
||||
break;
|
||||
case 9:
|
||||
return $this->getDbCueout();
|
||||
return $this->getDbCuein();
|
||||
break;
|
||||
case 10:
|
||||
return $this->getDbFadein();
|
||||
return $this->getDbCueout();
|
||||
break;
|
||||
case 11:
|
||||
return $this->getDbFadein();
|
||||
break;
|
||||
case 12:
|
||||
return $this->getDbFadeout();
|
||||
break;
|
||||
default:
|
||||
|
@ -1144,11 +1190,12 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
|
|||
$keys[4] => $this->getDbStreamId(),
|
||||
$keys[5] => $this->getDbType(),
|
||||
$keys[6] => $this->getDbPosition(),
|
||||
$keys[7] => $this->getDbCliplength(),
|
||||
$keys[8] => $this->getDbCuein(),
|
||||
$keys[9] => $this->getDbCueout(),
|
||||
$keys[10] => $this->getDbFadein(),
|
||||
$keys[11] => $this->getDbFadeout(),
|
||||
$keys[7] => $this->getDbOffset(),
|
||||
$keys[8] => $this->getDbCliplength(),
|
||||
$keys[9] => $this->getDbCuein(),
|
||||
$keys[10] => $this->getDbCueout(),
|
||||
$keys[11] => $this->getDbFadein(),
|
||||
$keys[12] => $this->getDbFadeout(),
|
||||
);
|
||||
if ($includeForeignObjects) {
|
||||
if (null !== $this->aCcFiles) {
|
||||
|
@ -1213,18 +1260,21 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
|
|||
$this->setDbPosition($value);
|
||||
break;
|
||||
case 7:
|
||||
$this->setDbCliplength($value);
|
||||
$this->setDbOffset($value);
|
||||
break;
|
||||
case 8:
|
||||
$this->setDbCuein($value);
|
||||
$this->setDbCliplength($value);
|
||||
break;
|
||||
case 9:
|
||||
$this->setDbCueout($value);
|
||||
$this->setDbCuein($value);
|
||||
break;
|
||||
case 10:
|
||||
$this->setDbFadein($value);
|
||||
$this->setDbCueout($value);
|
||||
break;
|
||||
case 11:
|
||||
$this->setDbFadein($value);
|
||||
break;
|
||||
case 12:
|
||||
$this->setDbFadeout($value);
|
||||
break;
|
||||
} // switch()
|
||||
|
@ -1258,11 +1308,12 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
|
|||
if (array_key_exists($keys[4], $arr)) $this->setDbStreamId($arr[$keys[4]]);
|
||||
if (array_key_exists($keys[5], $arr)) $this->setDbType($arr[$keys[5]]);
|
||||
if (array_key_exists($keys[6], $arr)) $this->setDbPosition($arr[$keys[6]]);
|
||||
if (array_key_exists($keys[7], $arr)) $this->setDbCliplength($arr[$keys[7]]);
|
||||
if (array_key_exists($keys[8], $arr)) $this->setDbCuein($arr[$keys[8]]);
|
||||
if (array_key_exists($keys[9], $arr)) $this->setDbCueout($arr[$keys[9]]);
|
||||
if (array_key_exists($keys[10], $arr)) $this->setDbFadein($arr[$keys[10]]);
|
||||
if (array_key_exists($keys[11], $arr)) $this->setDbFadeout($arr[$keys[11]]);
|
||||
if (array_key_exists($keys[7], $arr)) $this->setDbOffset($arr[$keys[7]]);
|
||||
if (array_key_exists($keys[8], $arr)) $this->setDbCliplength($arr[$keys[8]]);
|
||||
if (array_key_exists($keys[9], $arr)) $this->setDbCuein($arr[$keys[9]]);
|
||||
if (array_key_exists($keys[10], $arr)) $this->setDbCueout($arr[$keys[10]]);
|
||||
if (array_key_exists($keys[11], $arr)) $this->setDbFadein($arr[$keys[11]]);
|
||||
if (array_key_exists($keys[12], $arr)) $this->setDbFadeout($arr[$keys[12]]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1281,6 +1332,7 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
|
|||
if ($this->isColumnModified(CcPlaylistcontentsPeer::STREAM_ID)) $criteria->add(CcPlaylistcontentsPeer::STREAM_ID, $this->stream_id);
|
||||
if ($this->isColumnModified(CcPlaylistcontentsPeer::TYPE)) $criteria->add(CcPlaylistcontentsPeer::TYPE, $this->type);
|
||||
if ($this->isColumnModified(CcPlaylistcontentsPeer::POSITION)) $criteria->add(CcPlaylistcontentsPeer::POSITION, $this->position);
|
||||
if ($this->isColumnModified(CcPlaylistcontentsPeer::OFFSET)) $criteria->add(CcPlaylistcontentsPeer::OFFSET, $this->offset);
|
||||
if ($this->isColumnModified(CcPlaylistcontentsPeer::CLIPLENGTH)) $criteria->add(CcPlaylistcontentsPeer::CLIPLENGTH, $this->cliplength);
|
||||
if ($this->isColumnModified(CcPlaylistcontentsPeer::CUEIN)) $criteria->add(CcPlaylistcontentsPeer::CUEIN, $this->cuein);
|
||||
if ($this->isColumnModified(CcPlaylistcontentsPeer::CUEOUT)) $criteria->add(CcPlaylistcontentsPeer::CUEOUT, $this->cueout);
|
||||
|
@ -1353,6 +1405,7 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
|
|||
$copyObj->setDbStreamId($this->stream_id);
|
||||
$copyObj->setDbType($this->type);
|
||||
$copyObj->setDbPosition($this->position);
|
||||
$copyObj->setDbOffset($this->offset);
|
||||
$copyObj->setDbCliplength($this->cliplength);
|
||||
$copyObj->setDbCuein($this->cuein);
|
||||
$copyObj->setDbCueout($this->cueout);
|
||||
|
@ -1564,6 +1617,7 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
|
|||
$this->stream_id = null;
|
||||
$this->type = null;
|
||||
$this->position = null;
|
||||
$this->offset = null;
|
||||
$this->cliplength = null;
|
||||
$this->cuein = null;
|
||||
$this->cueout = null;
|
||||
|
|
|
@ -26,7 +26,7 @@ abstract class BaseCcPlaylistcontentsPeer {
|
|||
const TM_CLASS = 'CcPlaylistcontentsTableMap';
|
||||
|
||||
/** The total number of columns. */
|
||||
const NUM_COLUMNS = 12;
|
||||
const NUM_COLUMNS = 13;
|
||||
|
||||
/** The number of lazy-loaded columns. */
|
||||
const NUM_LAZY_LOAD_COLUMNS = 0;
|
||||
|
@ -52,6 +52,9 @@ abstract class BaseCcPlaylistcontentsPeer {
|
|||
/** the column name for the POSITION field */
|
||||
const POSITION = 'cc_playlistcontents.POSITION';
|
||||
|
||||
/** the column name for the OFFSET field */
|
||||
const OFFSET = 'cc_playlistcontents.OFFSET';
|
||||
|
||||
/** the column name for the CLIPLENGTH field */
|
||||
const CLIPLENGTH = 'cc_playlistcontents.CLIPLENGTH';
|
||||
|
||||
|
@ -83,12 +86,12 @@ abstract class BaseCcPlaylistcontentsPeer {
|
|||
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
||||
*/
|
||||
private static $fieldNames = array (
|
||||
BasePeer::TYPE_PHPNAME => array ('DbId', 'DbPlaylistId', 'DbFileId', 'DbBlockId', 'DbStreamId', 'DbType', 'DbPosition', 'DbCliplength', 'DbCuein', 'DbCueout', 'DbFadein', 'DbFadeout', ),
|
||||
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbPlaylistId', 'dbFileId', 'dbBlockId', 'dbStreamId', 'dbType', 'dbPosition', 'dbCliplength', 'dbCuein', 'dbCueout', 'dbFadein', 'dbFadeout', ),
|
||||
BasePeer::TYPE_COLNAME => array (self::ID, self::PLAYLIST_ID, self::FILE_ID, self::BLOCK_ID, self::STREAM_ID, self::TYPE, self::POSITION, self::CLIPLENGTH, self::CUEIN, self::CUEOUT, self::FADEIN, self::FADEOUT, ),
|
||||
BasePeer::TYPE_RAW_COLNAME => array ('ID', 'PLAYLIST_ID', 'FILE_ID', 'BLOCK_ID', 'STREAM_ID', 'TYPE', 'POSITION', 'CLIPLENGTH', 'CUEIN', 'CUEOUT', 'FADEIN', 'FADEOUT', ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('id', 'playlist_id', 'file_id', 'block_id', 'stream_id', 'type', 'position', 'cliplength', 'cuein', 'cueout', 'fadein', 'fadeout', ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, )
|
||||
BasePeer::TYPE_PHPNAME => array ('DbId', 'DbPlaylistId', 'DbFileId', 'DbBlockId', 'DbStreamId', 'DbType', 'DbPosition', 'DbOffset', 'DbCliplength', 'DbCuein', 'DbCueout', 'DbFadein', 'DbFadeout', ),
|
||||
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbPlaylistId', 'dbFileId', 'dbBlockId', 'dbStreamId', 'dbType', 'dbPosition', 'dbOffset', 'dbCliplength', 'dbCuein', 'dbCueout', 'dbFadein', 'dbFadeout', ),
|
||||
BasePeer::TYPE_COLNAME => array (self::ID, self::PLAYLIST_ID, self::FILE_ID, self::BLOCK_ID, self::STREAM_ID, self::TYPE, self::POSITION, self::OFFSET, self::CLIPLENGTH, self::CUEIN, self::CUEOUT, self::FADEIN, self::FADEOUT, ),
|
||||
BasePeer::TYPE_RAW_COLNAME => array ('ID', 'PLAYLIST_ID', 'FILE_ID', 'BLOCK_ID', 'STREAM_ID', 'TYPE', 'POSITION', 'OFFSET', 'CLIPLENGTH', 'CUEIN', 'CUEOUT', 'FADEIN', 'FADEOUT', ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('id', 'playlist_id', 'file_id', 'block_id', 'stream_id', 'type', 'position', 'offset', 'cliplength', 'cuein', 'cueout', 'fadein', 'fadeout', ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, )
|
||||
);
|
||||
|
||||
/**
|
||||
|
@ -98,12 +101,12 @@ abstract class BaseCcPlaylistcontentsPeer {
|
|||
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
|
||||
*/
|
||||
private static $fieldKeys = array (
|
||||
BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbPlaylistId' => 1, 'DbFileId' => 2, 'DbBlockId' => 3, 'DbStreamId' => 4, 'DbType' => 5, 'DbPosition' => 6, 'DbCliplength' => 7, 'DbCuein' => 8, 'DbCueout' => 9, 'DbFadein' => 10, 'DbFadeout' => 11, ),
|
||||
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbPlaylistId' => 1, 'dbFileId' => 2, 'dbBlockId' => 3, 'dbStreamId' => 4, 'dbType' => 5, 'dbPosition' => 6, 'dbCliplength' => 7, 'dbCuein' => 8, 'dbCueout' => 9, 'dbFadein' => 10, 'dbFadeout' => 11, ),
|
||||
BasePeer::TYPE_COLNAME => array (self::ID => 0, self::PLAYLIST_ID => 1, self::FILE_ID => 2, self::BLOCK_ID => 3, self::STREAM_ID => 4, self::TYPE => 5, self::POSITION => 6, self::CLIPLENGTH => 7, self::CUEIN => 8, self::CUEOUT => 9, self::FADEIN => 10, self::FADEOUT => 11, ),
|
||||
BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'PLAYLIST_ID' => 1, 'FILE_ID' => 2, 'BLOCK_ID' => 3, 'STREAM_ID' => 4, 'TYPE' => 5, 'POSITION' => 6, 'CLIPLENGTH' => 7, 'CUEIN' => 8, 'CUEOUT' => 9, 'FADEIN' => 10, 'FADEOUT' => 11, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'playlist_id' => 1, 'file_id' => 2, 'block_id' => 3, 'stream_id' => 4, 'type' => 5, 'position' => 6, 'cliplength' => 7, 'cuein' => 8, 'cueout' => 9, 'fadein' => 10, 'fadeout' => 11, ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, )
|
||||
BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbPlaylistId' => 1, 'DbFileId' => 2, 'DbBlockId' => 3, 'DbStreamId' => 4, 'DbType' => 5, 'DbPosition' => 6, 'DbOffset' => 7, 'DbCliplength' => 8, 'DbCuein' => 9, 'DbCueout' => 10, 'DbFadein' => 11, 'DbFadeout' => 12, ),
|
||||
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbPlaylistId' => 1, 'dbFileId' => 2, 'dbBlockId' => 3, 'dbStreamId' => 4, 'dbType' => 5, 'dbPosition' => 6, 'dbOffset' => 7, 'dbCliplength' => 8, 'dbCuein' => 9, 'dbCueout' => 10, 'dbFadein' => 11, 'dbFadeout' => 12, ),
|
||||
BasePeer::TYPE_COLNAME => array (self::ID => 0, self::PLAYLIST_ID => 1, self::FILE_ID => 2, self::BLOCK_ID => 3, self::STREAM_ID => 4, self::TYPE => 5, self::POSITION => 6, self::OFFSET => 7, self::CLIPLENGTH => 8, self::CUEIN => 9, self::CUEOUT => 10, self::FADEIN => 11, self::FADEOUT => 12, ),
|
||||
BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'PLAYLIST_ID' => 1, 'FILE_ID' => 2, 'BLOCK_ID' => 3, 'STREAM_ID' => 4, 'TYPE' => 5, 'POSITION' => 6, 'OFFSET' => 7, 'CLIPLENGTH' => 8, 'CUEIN' => 9, 'CUEOUT' => 10, 'FADEIN' => 11, 'FADEOUT' => 12, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'playlist_id' => 1, 'file_id' => 2, 'block_id' => 3, 'stream_id' => 4, 'type' => 5, 'position' => 6, 'offset' => 7, 'cliplength' => 8, 'cuein' => 9, 'cueout' => 10, 'fadein' => 11, 'fadeout' => 12, ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, )
|
||||
);
|
||||
|
||||
/**
|
||||
|
@ -182,6 +185,7 @@ abstract class BaseCcPlaylistcontentsPeer {
|
|||
$criteria->addSelectColumn(CcPlaylistcontentsPeer::STREAM_ID);
|
||||
$criteria->addSelectColumn(CcPlaylistcontentsPeer::TYPE);
|
||||
$criteria->addSelectColumn(CcPlaylistcontentsPeer::POSITION);
|
||||
$criteria->addSelectColumn(CcPlaylistcontentsPeer::OFFSET);
|
||||
$criteria->addSelectColumn(CcPlaylistcontentsPeer::CLIPLENGTH);
|
||||
$criteria->addSelectColumn(CcPlaylistcontentsPeer::CUEIN);
|
||||
$criteria->addSelectColumn(CcPlaylistcontentsPeer::CUEOUT);
|
||||
|
@ -195,6 +199,7 @@ abstract class BaseCcPlaylistcontentsPeer {
|
|||
$criteria->addSelectColumn($alias . '.STREAM_ID');
|
||||
$criteria->addSelectColumn($alias . '.TYPE');
|
||||
$criteria->addSelectColumn($alias . '.POSITION');
|
||||
$criteria->addSelectColumn($alias . '.OFFSET');
|
||||
$criteria->addSelectColumn($alias . '.CLIPLENGTH');
|
||||
$criteria->addSelectColumn($alias . '.CUEIN');
|
||||
$criteria->addSelectColumn($alias . '.CUEOUT');
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
* @method CcPlaylistcontentsQuery orderByDbStreamId($order = Criteria::ASC) Order by the stream_id column
|
||||
* @method CcPlaylistcontentsQuery orderByDbType($order = Criteria::ASC) Order by the type column
|
||||
* @method CcPlaylistcontentsQuery orderByDbPosition($order = Criteria::ASC) Order by the position column
|
||||
* @method CcPlaylistcontentsQuery orderByDbOffset($order = Criteria::ASC) Order by the offset column
|
||||
* @method CcPlaylistcontentsQuery orderByDbCliplength($order = Criteria::ASC) Order by the cliplength column
|
||||
* @method CcPlaylistcontentsQuery orderByDbCuein($order = Criteria::ASC) Order by the cuein column
|
||||
* @method CcPlaylistcontentsQuery orderByDbCueout($order = Criteria::ASC) Order by the cueout column
|
||||
|
@ -26,6 +27,7 @@
|
|||
* @method CcPlaylistcontentsQuery groupByDbStreamId() Group by the stream_id column
|
||||
* @method CcPlaylistcontentsQuery groupByDbType() Group by the type column
|
||||
* @method CcPlaylistcontentsQuery groupByDbPosition() Group by the position column
|
||||
* @method CcPlaylistcontentsQuery groupByDbOffset() Group by the offset column
|
||||
* @method CcPlaylistcontentsQuery groupByDbCliplength() Group by the cliplength column
|
||||
* @method CcPlaylistcontentsQuery groupByDbCuein() Group by the cuein column
|
||||
* @method CcPlaylistcontentsQuery groupByDbCueout() Group by the cueout column
|
||||
|
@ -58,6 +60,7 @@
|
|||
* @method CcPlaylistcontents findOneByDbStreamId(int $stream_id) Return the first CcPlaylistcontents filtered by the stream_id column
|
||||
* @method CcPlaylistcontents findOneByDbType(int $type) Return the first CcPlaylistcontents filtered by the type column
|
||||
* @method CcPlaylistcontents findOneByDbPosition(int $position) Return the first CcPlaylistcontents filtered by the position column
|
||||
* @method CcPlaylistcontents findOneByDbOffset(double $offset) Return the first CcPlaylistcontents filtered by the offset column
|
||||
* @method CcPlaylistcontents findOneByDbCliplength(string $cliplength) Return the first CcPlaylistcontents filtered by the cliplength column
|
||||
* @method CcPlaylistcontents findOneByDbCuein(string $cuein) Return the first CcPlaylistcontents filtered by the cuein column
|
||||
* @method CcPlaylistcontents findOneByDbCueout(string $cueout) Return the first CcPlaylistcontents filtered by the cueout column
|
||||
|
@ -71,6 +74,7 @@
|
|||
* @method array findByDbStreamId(int $stream_id) Return CcPlaylistcontents objects filtered by the stream_id column
|
||||
* @method array findByDbType(int $type) Return CcPlaylistcontents objects filtered by the type column
|
||||
* @method array findByDbPosition(int $position) Return CcPlaylistcontents objects filtered by the position column
|
||||
* @method array findByDbOffset(double $offset) Return CcPlaylistcontents objects filtered by the offset column
|
||||
* @method array findByDbCliplength(string $cliplength) Return CcPlaylistcontents objects filtered by the cliplength column
|
||||
* @method array findByDbCuein(string $cuein) Return CcPlaylistcontents objects filtered by the cuein column
|
||||
* @method array findByDbCueout(string $cueout) Return CcPlaylistcontents objects filtered by the cueout column
|
||||
|
@ -388,6 +392,37 @@ abstract class BaseCcPlaylistcontentsQuery extends ModelCriteria
|
|||
return $this->addUsingAlias(CcPlaylistcontentsPeer::POSITION, $dbPosition, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the offset column
|
||||
*
|
||||
* @param double|array $dbOffset The value to use as filter.
|
||||
* Accepts an associative array('min' => $minValue, 'max' => $maxValue)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return CcPlaylistcontentsQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDbOffset($dbOffset = null, $comparison = null)
|
||||
{
|
||||
if (is_array($dbOffset)) {
|
||||
$useMinMax = false;
|
||||
if (isset($dbOffset['min'])) {
|
||||
$this->addUsingAlias(CcPlaylistcontentsPeer::OFFSET, $dbOffset['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($dbOffset['max'])) {
|
||||
$this->addUsingAlias(CcPlaylistcontentsPeer::OFFSET, $dbOffset['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
return $this;
|
||||
}
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
}
|
||||
return $this->addUsingAlias(CcPlaylistcontentsPeer::OFFSET, $dbOffset, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the cliplength column
|
||||
*
|
||||
|
|
|
@ -14,14 +14,27 @@
|
|||
</ul>
|
||||
<?php endif; ?>
|
||||
</dd>
|
||||
<dt id="stationDefaultFade-label" class="block-display">
|
||||
<label class="optional" for="stationDefaultFade"><?php echo $this->element->getElement('stationDefaultFade')->getLabel() ?></label>
|
||||
<dt id="stationDefaultFadeIn-label" class="block-display">
|
||||
<label class="optional" for="stationDefaultFadeIn"><?php echo $this->element->getElement('stationDefaultFadeIn')->getLabel() ?></label>
|
||||
</dt>
|
||||
<dd id="stationDefaultFade-element" class="block-display">
|
||||
<?php echo $this->element->getElement('stationDefaultFade') ?>
|
||||
<?php if($this->element->getElement('stationDefaultFade')->hasErrors()) : ?>
|
||||
<dd id="stationDefaultFadeIn-element" class="block-display">
|
||||
<?php echo $this->element->getElement('stationDefaultFadeIn') ?>
|
||||
<?php if($this->element->getElement('stationDefaultFadeIn')->hasErrors()) : ?>
|
||||
<ul class='errors'>
|
||||
<?php foreach($this->element->getElement('stationDefaultFade')->getMessages() as $error): ?>
|
||||
<?php foreach($this->element->getElement('stationDefaultFadeIn')->getMessages() as $error): ?>
|
||||
<li><?php echo $error; ?></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
</dd>
|
||||
<dt id="stationDefaultFadeOut-label" class="block-display">
|
||||
<label class="optional" for="stationDefaultFadeOut"><?php echo $this->element->getElement('stationDefaultFadeOut')->getLabel() ?></label>
|
||||
</dt>
|
||||
<dd id="stationDefaultFadeOut-element" class="block-display">
|
||||
<?php echo $this->element->getElement('stationDefaultFadeOut') ?>
|
||||
<?php if($this->element->getElement('stationDefaultFadeOut')->hasErrors()) : ?>
|
||||
<ul class='errors'>
|
||||
<?php foreach($this->element->getElement('stationDefaultFadeOut')->getMessages() as $error): ?>
|
||||
<li><?php echo $error; ?></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<?php }
|
||||
if ($this->item2Type == 0) {?>
|
||||
<dt><? echo _("Fade in: "); ?><span class='spl_cue_hint'><? echo _("(ss.t)")?></span></dt>
|
||||
<dd id="spl_fade_in_<?php echo $this->item2; ?>" class="spl_fade_in" data-fadein="<?php echo $this->item2Url; ?>" data-offset="<?php echo $this->offset; ?>"
|
||||
<dd id="spl_fade_in_<?php echo $this->item2; ?>" class="spl_fade_in" data-fadein="<?php echo $this->item2Url; ?>" data-offset="<?php if ($this->item1Type == 0) { echo $this->offset; } else { echo 0; } ?>"
|
||||
data-cuein="<?php echo $this->cueIn2; ?>" data-cueout="<?php echo $this->cueOut2; ?>" data-length="<?php echo $this->fadeIn; ?>"
|
||||
data-type="logarithmic">
|
||||
<span contenteditable="true" class="spl_text_input"><?php echo $this->fadeIn; ?></span>
|
||||
|
|
|
@ -227,7 +227,7 @@
|
|||
-->
|
||||
<column name="type" phpName="DbType" type="SMALLINT" required="true" default="0"/>
|
||||
<column name="position" phpName="DbPosition" type="INTEGER" required="false"/>
|
||||
<column name="starts" phpName="DbStarts" type="TIMESTAMP" required="true"/>
|
||||
<column name="offset" phpName="DbOffset" type="REAL" required="true" default="0"/>
|
||||
<column name="cliplength" phpName="DbCliplength" type="VARCHAR" sqlType="interval" required="false" defaultValue="00:00:00"/>
|
||||
<column name="cuein" phpName="DbCuein" type="VARCHAR" sqlType="interval" required="false" defaultValue="00:00:00"/>
|
||||
<column name="cueout" phpName="DbCueout" type="VARCHAR" sqlType="interval" required="false" defaultValue="00:00:00"/>
|
||||
|
|
|
@ -296,6 +296,7 @@ CREATE TABLE "cc_playlistcontents"
|
|||
"stream_id" INTEGER,
|
||||
"type" INT2 default 0 NOT NULL,
|
||||
"position" INTEGER,
|
||||
"offset" FLOAT default 0 NOT NULL,
|
||||
"cliplength" interval default '00:00:00',
|
||||
"cuein" interval default '00:00:00',
|
||||
"cueout" interval default '00:00:00',
|
||||
|
|
|
@ -1115,41 +1115,50 @@ var AIRTIME = (function(AIRTIME){
|
|||
$fadeOut = $parent.find(".spl_fade_out"),
|
||||
$fadeIn = $parent.find(".spl_fade_in"),
|
||||
$html = $($("#tmpl-pl-fades").html()),
|
||||
tracks = [
|
||||
{
|
||||
src: $fadeOut.data("fadeout"),
|
||||
cuein: $fadeOut.data("cuein"),
|
||||
cueout: $fadeOut.data("cueout"),
|
||||
moveable: false,
|
||||
fades: [{
|
||||
shape: $fadeOut.data("type"),
|
||||
type: "FadeOut",
|
||||
end: $fadeOut.data("cueout") - $fadeOut.data("cuein"),
|
||||
start: $fadeOut.data("cueout") - $fadeOut.data("cuein") - $fadeOut.data("length")
|
||||
}],
|
||||
states: {
|
||||
'fadein': false
|
||||
}
|
||||
},
|
||||
{
|
||||
src: $fadeIn.data("fadein"),
|
||||
start: $fadeIn.data("offset"),
|
||||
cuein: $fadeIn.data("cuein"),
|
||||
cueout: $fadeIn.data("cueout"),
|
||||
fades: [{
|
||||
shape: $fadeIn.data("type"),
|
||||
type: "FadeIn",
|
||||
end: $fadeIn.data("length"),
|
||||
start: 0
|
||||
}],
|
||||
states: {
|
||||
'fadeout': false
|
||||
}
|
||||
}
|
||||
],
|
||||
tracks = [],
|
||||
dim = AIRTIME.utilities.findViewportDimensions(),
|
||||
playlistEditor;
|
||||
|
||||
if ($fadeOut.length > 0) {
|
||||
|
||||
tracks.push({
|
||||
src: $fadeOut.data("fadeout"),
|
||||
cuein: $fadeOut.data("cuein"),
|
||||
cueout: $fadeOut.data("cueout"),
|
||||
fades: [{
|
||||
shape: $fadeOut.data("type"),
|
||||
type: "FadeOut",
|
||||
end: $fadeOut.data("cueout") - $fadeOut.data("cuein"),
|
||||
start: $fadeOut.data("cueout") - $fadeOut.data("cuein") - $fadeOut.data("length")
|
||||
}],
|
||||
states: {
|
||||
'fadein': false
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if ($fadeIn.length > 0) {
|
||||
|
||||
tracks.push({
|
||||
src: $fadeIn.data("fadein"),
|
||||
start: $fadeIn.data("offset"),
|
||||
cuein: $fadeIn.data("cuein"),
|
||||
cueout: $fadeIn.data("cueout"),
|
||||
fades: [{
|
||||
shape: $fadeIn.data("type"),
|
||||
type: "FadeIn",
|
||||
end: $fadeIn.data("length"),
|
||||
start: 0
|
||||
}],
|
||||
states: {
|
||||
'fadeout': false
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//set the first track to not be moveable (might only be one track depending on what follows)
|
||||
tracks[0].states["shift"] = false;
|
||||
|
||||
$html.dialog({
|
||||
modal: true,
|
||||
title: "Fade Editor",
|
||||
|
@ -1158,13 +1167,13 @@ var AIRTIME = (function(AIRTIME){
|
|||
width: dim.width - 100,
|
||||
height: dim.height - 100,
|
||||
buttons: [
|
||||
{text: "Cancel", click: function() {
|
||||
$(this).dialog("destroy");
|
||||
}},
|
||||
{text: "Save", click: function() {
|
||||
var json = playlistEditor.getJson();
|
||||
|
||||
var x;
|
||||
}},
|
||||
{text: "Cancel", click: function() {
|
||||
$(this).dialog("destroy");
|
||||
}}
|
||||
],
|
||||
open: function (event, ui) {
|
||||
|
@ -1223,14 +1232,14 @@ var AIRTIME = (function(AIRTIME){
|
|||
width: dim.width - 100,
|
||||
height: dim.height - 100,
|
||||
buttons: [
|
||||
{text: "Cancel", click: function() {
|
||||
$(this).dialog("destroy");
|
||||
}},
|
||||
{text: "Save", click: function() {
|
||||
var cueIn = $html.find('.editor-cue-in').val(),
|
||||
cueOut = $html.find('.editor-cue-out').val();
|
||||
|
||||
changeCues($html, id, cueIn, cueOut);
|
||||
}},
|
||||
{text: "Cancel", click: function() {
|
||||
$(this).dialog("destroy");
|
||||
}}
|
||||
],
|
||||
open: function (event, ui) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue