From 7992a9be2d0d9882de63d9c0a04e396271bcfe8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Mon, 21 Oct 2024 19:34:39 +0200 Subject: [PATCH] fix: intro/outro playlist unset was impossible (#3101) this reinstates the boolean fields in the database from the original PR to work around a foreign key contraint. THE UI remains unchanged --- ...0046_add_override_intro_outro_playlists.py | 4 + .../legacy/migrations/sql/schema.sql | 2 + api/libretime_api/schedule/models/show.py | 4 + .../schedule/serializers/show.py | 2 + api/schema.yml | 10 ++ .../common/AutoPlaylistManager.php | 8 +- .../application/forms/GeneralPreferences.php | 6 +- legacy/application/models/Show.php | 30 +++- legacy/application/models/airtime/CcShow.php | 2 + .../models/airtime/map/CcShowTableMap.php | 2 + .../models/airtime/om/BaseCcShow.php | 158 +++++++++++++++++- .../models/airtime/om/BaseCcShowPeer.php | 38 +++-- .../models/airtime/om/BaseCcShowQuery.php | 64 ++++++- .../application/services/ShowFormService.php | 4 +- legacy/application/services/ShowService.php | 4 + legacy/build/schema.xml | 2 + .../datasets/test_checkOverlappingShows.yml | 2 + .../services/database/ShowServiceDbTest.php | 2 + .../test_ccShowInsertedIntoDatabase.yml | 2 + ...hangeRepeatDayUpdatesScheduleCorrectly.yml | 2 + ...test_createBiWeeklyRepeatNoEndNoRRShow.yml | 2 + .../datasets/test_createLinkedShow.yml | 2 + ...reateMonthlyMonthlyRepeatNoEndNoRRShow.yml | 2 + ...createMonthlyWeeklyRepeatNoEndNoRRShow.yml | 2 + .../datasets/test_createNoRepeatNoRRShow.yml | 2 + .../datasets/test_createNoRepeatRRShow.yml | 2 + ...st_createQuadWeeklyRepeatNoEndNoRRShow.yml | 2 + ...est_createTriWeeklyRepeatNoEndNoRRShow.yml | 2 + .../test_createWeeklyRepeatNoEndNoRRShow.yml | 2 + .../test_createWeeklyRepeatRRShow.yml | 2 + .../datasets/test_deleteShowInstance.yml | 2 + ...test_deleteShowInstanceAndAllFollowing.yml | 2 + ...est_editRepeatingShowChangeNoEndOption.yml | 2 + .../test_editRepeatingShowInstance.yml | 2 + ...tRepeatShowDayUpdatesScheduleCorrectly.yml | 2 + ...CreationWhenUserMovesForwardInCalendar.yml | 2 + .../datasets/test_unlinkLinkedShow.yml | 2 + .../datasets/test_weeklyToBiWeekly.yml | 2 + .../datasets/test_weeklyToNoRepeat.yml | 2 + .../application/testdata/ShowServiceData.php | 14 ++ 40 files changed, 368 insertions(+), 32 deletions(-) diff --git a/api/libretime_api/legacy/migrations/0046_add_override_intro_outro_playlists.py b/api/libretime_api/legacy/migrations/0046_add_override_intro_outro_playlists.py index ffed6af62..3e2b04882 100644 --- a/api/libretime_api/legacy/migrations/0046_add_override_intro_outro_playlists.py +++ b/api/libretime_api/legacy/migrations/0046_add_override_intro_outro_playlists.py @@ -5,15 +5,19 @@ from django.db import migrations from ._migrations import legacy_migration_factory UP = """ +ALTER TABLE cc_show ADD COLUMN override_intro_playlist boolean default 'f' NOT NULL; ALTER TABLE cc_show ADD COLUMN intro_playlist_id integer DEFAULT NULL; ALTER TABLE cc_show ADD CONSTRAINT cc_playlist_intro_playlist_fkey FOREIGN KEY (intro_playlist_id) REFERENCES cc_playlist (id) ON DELETE SET NULL; +ALTER TABLE cc_show ADD COLUMN override_outro_playlist boolean default 'f' NOT NULL; ALTER TABLE cc_show ADD COLUMN outro_playlist_id integer DEFAULT NULL; ALTER TABLE cc_show ADD CONSTRAINT cc_playlist_outro_playlist_fkey FOREIGN KEY (outro_playlist_id) REFERENCES cc_playlist (id) ON DELETE SET NULL; """ DOWN = """ +ALTER TABLE cc_show DROP COLUMN IF EXISTS override_intro_playlist; ALTER TABLE cc_show DROP COLUMN IF EXISTS intro_playlist_id; ALTER TABLE cc_show DROP CONSTRAINT IF EXISTS cc_playlist_intro_playlist_fkey; +ALTER TABLE cc_show DROP COLUMN IF EXISTS override_outro_playlist; ALTER TABLE cc_show DROP COLUMN IF EXISTS outro_playlist_id; ALTER TABLE cc_show DROP CONSTRAINT IF EXISTS cc_playlist_outro_playlist_fkey; """ diff --git a/api/libretime_api/legacy/migrations/sql/schema.sql b/api/libretime_api/legacy/migrations/sql/schema.sql index dcb702579..47033018a 100644 --- a/api/libretime_api/legacy/migrations/sql/schema.sql +++ b/api/libretime_api/legacy/migrations/sql/schema.sql @@ -126,7 +126,9 @@ CREATE TABLE "cc_show" "has_autoplaylist" BOOLEAN DEFAULT 'f' NOT NULL, "autoplaylist_id" INTEGER, "autoplaylist_repeat" BOOLEAN DEFAULT 'f' NOT NULL, + "override_intro_playlist" BOOLEAN DEFAULT 'f' NOT NULL, "intro_playlist_id" INTEGER, + "override_outro_playlist" BOOLEAN DEFAULT 'f' NOT NULL, "outro_playlist_id" INTEGER, PRIMARY KEY ("id") ); diff --git a/api/libretime_api/schedule/models/show.py b/api/libretime_api/schedule/models/show.py index 2714346e3..0aac0e532 100644 --- a/api/libretime_api/schedule/models/show.py +++ b/api/libretime_api/schedule/models/show.py @@ -78,6 +78,8 @@ class Show(models.Model): related_name="intro_playlist", ) + override_intro_playlist = models.BooleanField(db_column="override_intro_playlist") + outro_playlist = models.ForeignKey( "schedule.Playlist", on_delete=models.DO_NOTHING, @@ -87,6 +89,8 @@ class Show(models.Model): related_name="outro_playlist", ) + override_outro_playlist = models.BooleanField(db_column="override_outro_playlist") + hosts = models.ManyToManyField( # type: ignore[var-annotated] "core.User", through="ShowHost", diff --git a/api/libretime_api/schedule/serializers/show.py b/api/libretime_api/schedule/serializers/show.py index 9dce841d8..1eefa64c6 100644 --- a/api/libretime_api/schedule/serializers/show.py +++ b/api/libretime_api/schedule/serializers/show.py @@ -22,7 +22,9 @@ class ShowSerializer(serializers.ModelSerializer): "auto_playlist_enabled", "auto_playlist_repeat", "intro_playlist", + "override_intro_playlist", "outro_playlist", + "override_outro_playlist", ] diff --git a/api/schema.yml b/api/schema.yml index 714a7bb67..054d1d074 100644 --- a/api/schema.yml +++ b/api/schema.yml @@ -6412,9 +6412,13 @@ components: intro_playlist: type: integer nullable: true + override_intro_playlist: + type: boolean outro_playlist: type: integer nullable: true + override_outro_playlist: + type: boolean PatchedShowDays: type: object properties: @@ -7250,9 +7254,13 @@ components: intro_playlist: type: integer nullable: true + override_intro_playlist: + type: boolean outro_playlist: type: integer nullable: true + override_outro_playlist: + type: boolean required: - auto_playlist_enabled - auto_playlist_repeat @@ -7261,6 +7269,8 @@ components: - linked - live_enabled - name + - override_intro_playlist + - override_outro_playlist ShowDays: type: object properties: diff --git a/legacy/application/common/AutoPlaylistManager.php b/legacy/application/common/AutoPlaylistManager.php index 21356114e..2354668aa 100644 --- a/legacy/application/common/AutoPlaylistManager.php +++ b/legacy/application/common/AutoPlaylistManager.php @@ -33,11 +33,15 @@ class AutoPlaylistManager // call the addPlaylist to show function and don't check for user permission to avoid call to non-existant user object $sid = $si->getShowId(); $playlistrepeat = new Application_Model_Show($sid); - if (!$introplaylistid = $playlistrepeat->getIntroPlaylistId()) { + if ($playlistrepeat->getHasOverrideIntroPlaylist()) { + $introplaylistid = $playlistrepeat->getIntroPlaylistId(); + } else { $introplaylistid = Application_Model_Preference::GetIntroPlaylist(); } - if (!$outroplaylistid = $playlistrepeat->getOutroPlaylistId()) { + if ($playlistrepeat->getHasOverrideOutroPlaylist()) { + $outroplaylistid = $playlistrepeat->getOutroPlaylistId(); + } else { $outroplaylistid = Application_Model_Preference::GetOutroPlaylist(); } diff --git a/legacy/application/forms/GeneralPreferences.php b/legacy/application/forms/GeneralPreferences.php index 59ace16a4..0e3a13e94 100644 --- a/legacy/application/forms/GeneralPreferences.php +++ b/legacy/application/forms/GeneralPreferences.php @@ -105,16 +105,18 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm $tracktypeDefault->setValue(Application_Model_Preference::GetTrackTypeDefault()); $this->addElement($tracktypeDefault); + $playlistNames = Application_Model_Library::getPlaylistNames(true); + // add intro playlist select here $introPlaylistSelect = new Zend_Form_Element_Select('introPlaylistSelect'); $introPlaylistSelect->setLabel(_('Intro Autoloading Playlist')); - $introPlaylistSelect->setMultiOptions(Application_Model_Library::getPlaylistNames(true)); + $introPlaylistSelect->setMultiOptions($playlistNames); $introPlaylistSelect->setValue(Application_Model_Preference::GetIntroPlaylist()); $this->addElement($introPlaylistSelect); $outroPlaylistSelect = new Zend_Form_Element_Select('outroPlaylistSelect'); $outroPlaylistSelect->setLabel(_('Outro Autoloading Playlist')); - $outroPlaylistSelect->setMultiOptions(Application_Model_Library::getPlaylistNames(true)); + $outroPlaylistSelect->setMultiOptions($playlistNames); $outroPlaylistSelect->setValue(Application_Model_Preference::GetOutroPlaylist()); $this->addElement($outroPlaylistSelect); diff --git a/legacy/application/models/Show.php b/legacy/application/models/Show.php index 392cd2c4a..890e403a0 100644 --- a/legacy/application/models/Show.php +++ b/legacy/application/models/Show.php @@ -169,29 +169,55 @@ class Application_Model_Show $show->setDbAutoPlaylistId($playlistid); } + public function getHasOverrideIntroPlaylist() + { + $show = CcShowQuery::create()->findPK($this->_showId); + + return $show->getDbOverrideIntroPlaylist(); + } + public function getIntroPlaylistId() { $show = CcShowQuery::create()->findPK($this->_showId); - return $show->getDbIntroPlaylistId(); + if ($show->getDbOverrideIntroPlaylist()) { + return $show->getDbIntroPlaylistId(); + } + + return 0; } public function setIntroPlaylistId($playlistid) { $show = CcShowQuery::create()->findPK($this->_showId); + + $show->setDbOverrideIntroPlaylist($playlistid != 0); $show->setDbIntroPlaylistId($playlistid); } + public function getHasOverrideOutroPlaylist() + { + $show = CcShowQuery::create()->findPK($this->_showId); + + return $show->getDbOverrideOutroPlaylist(); + } + public function getOutroPlaylistId() { $show = CcShowQuery::create()->findPK($this->_showId); - return $show->getDbOutroPlaylistId(); + if ($show->getDbOverrideOutroPlaylist()) { + return $show->getDbOutroPlaylistId(); + } + + return 0; } public function setOutroPlaylistId($playlistid) { $show = CcShowQuery::create()->findPK($this->_showId); + + $show->setDbOverrideOutroPlaylist($playlistid != 0); $show->setDbOutroPlaylistId($playlistid); } diff --git a/legacy/application/models/airtime/CcShow.php b/legacy/application/models/airtime/CcShow.php index 31da872ab..134dd27fd 100644 --- a/legacy/application/models/airtime/CcShow.php +++ b/legacy/application/models/airtime/CcShow.php @@ -327,7 +327,9 @@ class CcShow extends BaseCcShow $info['has_autoplaylist'] = $this->getDbHasAutoPlaylist(); $info['autoplaylist_id'] = $this->getDbAutoPlaylistId(); $info['autoplaylist_repeat'] = $this->getDbAutoPlaylistRepeat(); + $info['override_intro_playlist'] = $this->getDbOverrideIntroPlaylist(); $info['intro_playlist_id'] = $this->getDbIntroPlaylistId(); + $info['override_outro_playlist'] = $this->getDbOverrideOutroPlaylist(); $info['outro_playlist_id'] = $this->getDbOutroPlaylistId(); return $info; diff --git a/legacy/application/models/airtime/map/CcShowTableMap.php b/legacy/application/models/airtime/map/CcShowTableMap.php index 54de40be5..ac766011e 100644 --- a/legacy/application/models/airtime/map/CcShowTableMap.php +++ b/legacy/application/models/airtime/map/CcShowTableMap.php @@ -56,7 +56,9 @@ class CcShowTableMap extends TableMap $this->addColumn('has_autoplaylist', 'DbHasAutoPlaylist', 'BOOLEAN', true, null, false); $this->addForeignKey('autoplaylist_id', 'DbAutoPlaylistId', 'INTEGER', 'cc_playlist', 'id', false, null, null); $this->addColumn('autoplaylist_repeat', 'DbAutoPlaylistRepeat', 'BOOLEAN', true, null, false); + $this->addColumn('override_intro_playlist', 'DbOverrideIntroPlaylist', 'BOOLEAN', true, null, false); $this->addForeignKey('intro_playlist_id', 'DbIntroPlaylistId', 'INTEGER', 'cc_playlist', 'id', false, null, null); + $this->addColumn('override_outro_playlist', 'DbOverrideOutroPlaylist', 'BOOLEAN', true, null, false); $this->addForeignKey('outro_playlist_id', 'DbOutroPlaylistId', 'INTEGER', 'cc_playlist', 'id', false, null, null); // validators } // initialize() diff --git a/legacy/application/models/airtime/om/BaseCcShow.php b/legacy/application/models/airtime/om/BaseCcShow.php index 1dc838b1f..512f474ba 100644 --- a/legacy/application/models/airtime/om/BaseCcShow.php +++ b/legacy/application/models/airtime/om/BaseCcShow.php @@ -141,12 +141,26 @@ abstract class BaseCcShow extends BaseObject implements Persistent */ protected $autoplaylist_repeat; + /** + * The value for the override_intro_playlist field. + * Note: this column has a database default value of: false + * @var boolean + */ + protected $override_intro_playlist; + /** * The value for the intro_playlist_id field. * @var int */ protected $intro_playlist_id; + /** + * The value for the override_outro_playlist field. + * Note: this column has a database default value of: false + * @var boolean + */ + protected $override_outro_playlist; + /** * The value for the outro_playlist_id field. * @var int @@ -254,6 +268,8 @@ abstract class BaseCcShow extends BaseObject implements Persistent $this->image_path = ''; $this->has_autoplaylist = false; $this->autoplaylist_repeat = false; + $this->override_intro_playlist = false; + $this->override_outro_playlist = false; } /** @@ -453,6 +469,17 @@ abstract class BaseCcShow extends BaseObject implements Persistent return $this->autoplaylist_repeat; } + /** + * Get the [override_intro_playlist] column value. + * + * @return boolean + */ + public function getDbOverrideIntroPlaylist() + { + + return $this->override_intro_playlist; + } + /** * Get the [intro_playlist_id] column value. * @@ -464,6 +491,17 @@ abstract class BaseCcShow extends BaseObject implements Persistent return $this->intro_playlist_id; } + /** + * Get the [override_outro_playlist] column value. + * + * @return boolean + */ + public function getDbOverrideOutroPlaylist() + { + + return $this->override_outro_playlist; + } + /** * Get the [outro_playlist_id] column value. * @@ -884,6 +922,35 @@ abstract class BaseCcShow extends BaseObject implements Persistent return $this; } // setDbAutoPlaylistRepeat() + /** + * Sets the value of the [override_intro_playlist] column. + * Non-boolean arguments are converted using the following rules: + * * 1, '1', 'true', 'on', and 'yes' are converted to boolean true + * * 0, '0', 'false', 'off', and 'no' are converted to boolean false + * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). + * + * @param boolean|integer|string $v The new value + * @return CcShow The current object (for fluent API support) + */ + public function setDbOverrideIntroPlaylist($v) + { + if ($v !== null) { + if (is_string($v)) { + $v = in_array(strtolower($v), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true; + } else { + $v = (boolean) $v; + } + } + + if ($this->override_intro_playlist !== $v) { + $this->override_intro_playlist = $v; + $this->modifiedColumns[] = CcShowPeer::OVERRIDE_INTRO_PLAYLIST; + } + + + return $this; + } // setDbOverrideIntroPlaylist() + /** * Set the value of [intro_playlist_id] column. * @@ -909,6 +976,35 @@ abstract class BaseCcShow extends BaseObject implements Persistent return $this; } // setDbIntroPlaylistId() + /** + * Sets the value of the [override_outro_playlist] column. + * Non-boolean arguments are converted using the following rules: + * * 1, '1', 'true', 'on', and 'yes' are converted to boolean true + * * 0, '0', 'false', 'off', and 'no' are converted to boolean false + * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). + * + * @param boolean|integer|string $v The new value + * @return CcShow The current object (for fluent API support) + */ + public function setDbOverrideOutroPlaylist($v) + { + if ($v !== null) { + if (is_string($v)) { + $v = in_array(strtolower($v), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true; + } else { + $v = (boolean) $v; + } + } + + if ($this->override_outro_playlist !== $v) { + $this->override_outro_playlist = $v; + $this->modifiedColumns[] = CcShowPeer::OVERRIDE_OUTRO_PLAYLIST; + } + + + return $this; + } // setDbOverrideOutroPlaylist() + /** * Set the value of [outro_playlist_id] column. * @@ -984,6 +1080,14 @@ abstract class BaseCcShow extends BaseObject implements Persistent return false; } + if ($this->override_intro_playlist !== false) { + return false; + } + + if ($this->override_outro_playlist !== false) { + return false; + } + // otherwise, everything was equal, so return true return true; } // hasOnlyDefaultValues() @@ -1023,8 +1127,10 @@ abstract class BaseCcShow extends BaseObject implements Persistent $this->has_autoplaylist = ($row[$startcol + 14] !== null) ? (boolean) $row[$startcol + 14] : null; $this->autoplaylist_id = ($row[$startcol + 15] !== null) ? (int) $row[$startcol + 15] : null; $this->autoplaylist_repeat = ($row[$startcol + 16] !== null) ? (boolean) $row[$startcol + 16] : null; - $this->intro_playlist_id = ($row[$startcol + 17] !== null) ? (int) $row[$startcol + 17] : null; - $this->outro_playlist_id = ($row[$startcol + 18] !== null) ? (int) $row[$startcol + 18] : null; + $this->override_intro_playlist = ($row[$startcol + 17] !== null) ? (boolean) $row[$startcol + 17] : null; + $this->intro_playlist_id = ($row[$startcol + 18] !== null) ? (int) $row[$startcol + 18] : null; + $this->override_outro_playlist = ($row[$startcol + 19] !== null) ? (boolean) $row[$startcol + 19] : null; + $this->outro_playlist_id = ($row[$startcol + 20] !== null) ? (int) $row[$startcol + 20] : null; $this->resetModified(); $this->setNew(false); @@ -1034,7 +1140,7 @@ abstract class BaseCcShow extends BaseObject implements Persistent } $this->postHydrate($row, $startcol, $rehydrate); - return $startcol + 19; // 19 = CcShowPeer::NUM_HYDRATE_COLUMNS. + return $startcol + 21; // 21 = CcShowPeer::NUM_HYDRATE_COLUMNS. } catch (Exception $e) { throw new PropelException("Error populating CcShow object", $e); @@ -1421,9 +1527,15 @@ abstract class BaseCcShow extends BaseObject implements Persistent if ($this->isColumnModified(CcShowPeer::AUTOPLAYLIST_REPEAT)) { $modifiedColumns[':p' . $index++] = '"autoplaylist_repeat"'; } + if ($this->isColumnModified(CcShowPeer::OVERRIDE_INTRO_PLAYLIST)) { + $modifiedColumns[':p' . $index++] = '"override_intro_playlist"'; + } if ($this->isColumnModified(CcShowPeer::INTRO_PLAYLIST_ID)) { $modifiedColumns[':p' . $index++] = '"intro_playlist_id"'; } + if ($this->isColumnModified(CcShowPeer::OVERRIDE_OUTRO_PLAYLIST)) { + $modifiedColumns[':p' . $index++] = '"override_outro_playlist"'; + } if ($this->isColumnModified(CcShowPeer::OUTRO_PLAYLIST_ID)) { $modifiedColumns[':p' . $index++] = '"outro_playlist_id"'; } @@ -1489,9 +1601,15 @@ abstract class BaseCcShow extends BaseObject implements Persistent case '"autoplaylist_repeat"': $stmt->bindValue($identifier, $this->autoplaylist_repeat, PDO::PARAM_BOOL); break; + case '"override_intro_playlist"': + $stmt->bindValue($identifier, $this->override_intro_playlist, PDO::PARAM_BOOL); + break; case '"intro_playlist_id"': $stmt->bindValue($identifier, $this->intro_playlist_id, PDO::PARAM_INT); break; + case '"override_outro_playlist"': + $stmt->bindValue($identifier, $this->override_outro_playlist, PDO::PARAM_BOOL); + break; case '"outro_playlist_id"': $stmt->bindValue($identifier, $this->outro_playlist_id, PDO::PARAM_INT); break; @@ -1730,9 +1848,15 @@ abstract class BaseCcShow extends BaseObject implements Persistent return $this->getDbAutoPlaylistRepeat(); break; case 17: - return $this->getDbIntroPlaylistId(); + return $this->getDbOverrideIntroPlaylist(); break; case 18: + return $this->getDbIntroPlaylistId(); + break; + case 19: + return $this->getDbOverrideOutroPlaylist(); + break; + case 20: return $this->getDbOutroPlaylistId(); break; default: @@ -1781,8 +1905,10 @@ abstract class BaseCcShow extends BaseObject implements Persistent $keys[14] => $this->getDbHasAutoPlaylist(), $keys[15] => $this->getDbAutoPlaylistId(), $keys[16] => $this->getDbAutoPlaylistRepeat(), - $keys[17] => $this->getDbIntroPlaylistId(), - $keys[18] => $this->getDbOutroPlaylistId(), + $keys[17] => $this->getDbOverrideIntroPlaylist(), + $keys[18] => $this->getDbIntroPlaylistId(), + $keys[19] => $this->getDbOverrideOutroPlaylist(), + $keys[20] => $this->getDbOutroPlaylistId(), ); $virtualColumns = $this->virtualColumns; foreach ($virtualColumns as $key => $virtualColumn) { @@ -1897,9 +2023,15 @@ abstract class BaseCcShow extends BaseObject implements Persistent $this->setDbAutoPlaylistRepeat($value); break; case 17: - $this->setDbIntroPlaylistId($value); + $this->setDbOverrideIntroPlaylist($value); break; case 18: + $this->setDbIntroPlaylistId($value); + break; + case 19: + $this->setDbOverrideOutroPlaylist($value); + break; + case 20: $this->setDbOutroPlaylistId($value); break; } // switch() @@ -1943,8 +2075,10 @@ abstract class BaseCcShow extends BaseObject implements Persistent if (array_key_exists($keys[14], $arr)) $this->setDbHasAutoPlaylist($arr[$keys[14]]); if (array_key_exists($keys[15], $arr)) $this->setDbAutoPlaylistId($arr[$keys[15]]); if (array_key_exists($keys[16], $arr)) $this->setDbAutoPlaylistRepeat($arr[$keys[16]]); - if (array_key_exists($keys[17], $arr)) $this->setDbIntroPlaylistId($arr[$keys[17]]); - if (array_key_exists($keys[18], $arr)) $this->setDbOutroPlaylistId($arr[$keys[18]]); + if (array_key_exists($keys[17], $arr)) $this->setDbOverrideIntroPlaylist($arr[$keys[17]]); + if (array_key_exists($keys[18], $arr)) $this->setDbIntroPlaylistId($arr[$keys[18]]); + if (array_key_exists($keys[19], $arr)) $this->setDbOverrideOutroPlaylist($arr[$keys[19]]); + if (array_key_exists($keys[20], $arr)) $this->setDbOutroPlaylistId($arr[$keys[20]]); } /** @@ -1973,7 +2107,9 @@ abstract class BaseCcShow extends BaseObject implements Persistent if ($this->isColumnModified(CcShowPeer::HAS_AUTOPLAYLIST)) $criteria->add(CcShowPeer::HAS_AUTOPLAYLIST, $this->has_autoplaylist); if ($this->isColumnModified(CcShowPeer::AUTOPLAYLIST_ID)) $criteria->add(CcShowPeer::AUTOPLAYLIST_ID, $this->autoplaylist_id); if ($this->isColumnModified(CcShowPeer::AUTOPLAYLIST_REPEAT)) $criteria->add(CcShowPeer::AUTOPLAYLIST_REPEAT, $this->autoplaylist_repeat); + if ($this->isColumnModified(CcShowPeer::OVERRIDE_INTRO_PLAYLIST)) $criteria->add(CcShowPeer::OVERRIDE_INTRO_PLAYLIST, $this->override_intro_playlist); if ($this->isColumnModified(CcShowPeer::INTRO_PLAYLIST_ID)) $criteria->add(CcShowPeer::INTRO_PLAYLIST_ID, $this->intro_playlist_id); + if ($this->isColumnModified(CcShowPeer::OVERRIDE_OUTRO_PLAYLIST)) $criteria->add(CcShowPeer::OVERRIDE_OUTRO_PLAYLIST, $this->override_outro_playlist); if ($this->isColumnModified(CcShowPeer::OUTRO_PLAYLIST_ID)) $criteria->add(CcShowPeer::OUTRO_PLAYLIST_ID, $this->outro_playlist_id); return $criteria; @@ -2054,7 +2190,9 @@ abstract class BaseCcShow extends BaseObject implements Persistent $copyObj->setDbHasAutoPlaylist($this->getDbHasAutoPlaylist()); $copyObj->setDbAutoPlaylistId($this->getDbAutoPlaylistId()); $copyObj->setDbAutoPlaylistRepeat($this->getDbAutoPlaylistRepeat()); + $copyObj->setDbOverrideIntroPlaylist($this->getDbOverrideIntroPlaylist()); $copyObj->setDbIntroPlaylistId($this->getDbIntroPlaylistId()); + $copyObj->setDbOverrideOutroPlaylist($this->getDbOverrideOutroPlaylist()); $copyObj->setDbOutroPlaylistId($this->getDbOutroPlaylistId()); if ($deepCopy && !$this->startCopy) { @@ -3316,7 +3454,9 @@ abstract class BaseCcShow extends BaseObject implements Persistent $this->has_autoplaylist = null; $this->autoplaylist_id = null; $this->autoplaylist_repeat = null; + $this->override_intro_playlist = null; $this->intro_playlist_id = null; + $this->override_outro_playlist = null; $this->outro_playlist_id = null; $this->alreadyInSave = false; $this->alreadyInValidation = false; diff --git a/legacy/application/models/airtime/om/BaseCcShowPeer.php b/legacy/application/models/airtime/om/BaseCcShowPeer.php index 3f5270822..1843f5b5b 100644 --- a/legacy/application/models/airtime/om/BaseCcShowPeer.php +++ b/legacy/application/models/airtime/om/BaseCcShowPeer.php @@ -24,13 +24,13 @@ abstract class BaseCcShowPeer const TM_CLASS = 'CcShowTableMap'; /** The total number of columns. */ - const NUM_COLUMNS = 19; + const NUM_COLUMNS = 21; /** The number of lazy-loaded columns. */ const NUM_LAZY_LOAD_COLUMNS = 0; /** The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS) */ - const NUM_HYDRATE_COLUMNS = 19; + const NUM_HYDRATE_COLUMNS = 21; /** the column name for the id field */ const ID = 'cc_show.id'; @@ -83,9 +83,15 @@ abstract class BaseCcShowPeer /** the column name for the autoplaylist_repeat field */ const AUTOPLAYLIST_REPEAT = 'cc_show.autoplaylist_repeat'; + /** the column name for the override_intro_playlist field */ + const OVERRIDE_INTRO_PLAYLIST = 'cc_show.override_intro_playlist'; + /** the column name for the intro_playlist_id field */ const INTRO_PLAYLIST_ID = 'cc_show.intro_playlist_id'; + /** the column name for the override_outro_playlist field */ + const OVERRIDE_OUTRO_PLAYLIST = 'cc_show.override_outro_playlist'; + /** the column name for the outro_playlist_id field */ const OUTRO_PLAYLIST_ID = 'cc_show.outro_playlist_id'; @@ -108,12 +114,12 @@ abstract class BaseCcShowPeer * e.g. CcShowPeer::$fieldNames[CcShowPeer::TYPE_PHPNAME][0] = 'Id' */ protected static $fieldNames = array ( - BasePeer::TYPE_PHPNAME => array ('DbId', 'DbName', 'DbUrl', 'DbGenre', 'DbDescription', 'DbColor', 'DbBackgroundColor', 'DbLiveStreamUsingAirtimeAuth', 'DbLiveStreamUsingCustomAuth', 'DbLiveStreamUser', 'DbLiveStreamPass', 'DbLinked', 'DbIsLinkable', 'DbImagePath', 'DbHasAutoPlaylist', 'DbAutoPlaylistId', 'DbAutoPlaylistRepeat', 'DbIntroPlaylistId', 'DbOutroPlaylistId', ), - BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbName', 'dbUrl', 'dbGenre', 'dbDescription', 'dbColor', 'dbBackgroundColor', 'dbLiveStreamUsingAirtimeAuth', 'dbLiveStreamUsingCustomAuth', 'dbLiveStreamUser', 'dbLiveStreamPass', 'dbLinked', 'dbIsLinkable', 'dbImagePath', 'dbHasAutoPlaylist', 'dbAutoPlaylistId', 'dbAutoPlaylistRepeat', 'dbIntroPlaylistId', 'dbOutroPlaylistId', ), - BasePeer::TYPE_COLNAME => array (CcShowPeer::ID, CcShowPeer::NAME, CcShowPeer::URL, CcShowPeer::GENRE, CcShowPeer::DESCRIPTION, CcShowPeer::COLOR, CcShowPeer::BACKGROUND_COLOR, CcShowPeer::LIVE_STREAM_USING_AIRTIME_AUTH, CcShowPeer::LIVE_STREAM_USING_CUSTOM_AUTH, CcShowPeer::LIVE_STREAM_USER, CcShowPeer::LIVE_STREAM_PASS, CcShowPeer::LINKED, CcShowPeer::IS_LINKABLE, CcShowPeer::IMAGE_PATH, CcShowPeer::HAS_AUTOPLAYLIST, CcShowPeer::AUTOPLAYLIST_ID, CcShowPeer::AUTOPLAYLIST_REPEAT, CcShowPeer::INTRO_PLAYLIST_ID, CcShowPeer::OUTRO_PLAYLIST_ID, ), - BasePeer::TYPE_RAW_COLNAME => array ('ID', 'NAME', 'URL', 'GENRE', 'DESCRIPTION', 'COLOR', 'BACKGROUND_COLOR', 'LIVE_STREAM_USING_AIRTIME_AUTH', 'LIVE_STREAM_USING_CUSTOM_AUTH', 'LIVE_STREAM_USER', 'LIVE_STREAM_PASS', 'LINKED', 'IS_LINKABLE', 'IMAGE_PATH', 'HAS_AUTOPLAYLIST', 'AUTOPLAYLIST_ID', 'AUTOPLAYLIST_REPEAT', 'INTRO_PLAYLIST_ID', 'OUTRO_PLAYLIST_ID', ), - BasePeer::TYPE_FIELDNAME => array ('id', 'name', 'url', 'genre', 'description', 'color', 'background_color', 'live_stream_using_airtime_auth', 'live_stream_using_custom_auth', 'live_stream_user', 'live_stream_pass', 'linked', 'is_linkable', 'image_path', 'has_autoplaylist', 'autoplaylist_id', 'autoplaylist_repeat', 'intro_playlist_id', 'outro_playlist_id', ), - BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, ) + BasePeer::TYPE_PHPNAME => array ('DbId', 'DbName', 'DbUrl', 'DbGenre', 'DbDescription', 'DbColor', 'DbBackgroundColor', 'DbLiveStreamUsingAirtimeAuth', 'DbLiveStreamUsingCustomAuth', 'DbLiveStreamUser', 'DbLiveStreamPass', 'DbLinked', 'DbIsLinkable', 'DbImagePath', 'DbHasAutoPlaylist', 'DbAutoPlaylistId', 'DbAutoPlaylistRepeat', 'DbOverrideIntroPlaylist', 'DbIntroPlaylistId', 'DbOverrideOutroPlaylist', 'DbOutroPlaylistId', ), + BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbName', 'dbUrl', 'dbGenre', 'dbDescription', 'dbColor', 'dbBackgroundColor', 'dbLiveStreamUsingAirtimeAuth', 'dbLiveStreamUsingCustomAuth', 'dbLiveStreamUser', 'dbLiveStreamPass', 'dbLinked', 'dbIsLinkable', 'dbImagePath', 'dbHasAutoPlaylist', 'dbAutoPlaylistId', 'dbAutoPlaylistRepeat', 'dbOverrideIntroPlaylist', 'dbIntroPlaylistId', 'dbOverrideOutroPlaylist', 'dbOutroPlaylistId', ), + BasePeer::TYPE_COLNAME => array (CcShowPeer::ID, CcShowPeer::NAME, CcShowPeer::URL, CcShowPeer::GENRE, CcShowPeer::DESCRIPTION, CcShowPeer::COLOR, CcShowPeer::BACKGROUND_COLOR, CcShowPeer::LIVE_STREAM_USING_AIRTIME_AUTH, CcShowPeer::LIVE_STREAM_USING_CUSTOM_AUTH, CcShowPeer::LIVE_STREAM_USER, CcShowPeer::LIVE_STREAM_PASS, CcShowPeer::LINKED, CcShowPeer::IS_LINKABLE, CcShowPeer::IMAGE_PATH, CcShowPeer::HAS_AUTOPLAYLIST, CcShowPeer::AUTOPLAYLIST_ID, CcShowPeer::AUTOPLAYLIST_REPEAT, CcShowPeer::OVERRIDE_INTRO_PLAYLIST, CcShowPeer::INTRO_PLAYLIST_ID, CcShowPeer::OVERRIDE_OUTRO_PLAYLIST, CcShowPeer::OUTRO_PLAYLIST_ID, ), + BasePeer::TYPE_RAW_COLNAME => array ('ID', 'NAME', 'URL', 'GENRE', 'DESCRIPTION', 'COLOR', 'BACKGROUND_COLOR', 'LIVE_STREAM_USING_AIRTIME_AUTH', 'LIVE_STREAM_USING_CUSTOM_AUTH', 'LIVE_STREAM_USER', 'LIVE_STREAM_PASS', 'LINKED', 'IS_LINKABLE', 'IMAGE_PATH', 'HAS_AUTOPLAYLIST', 'AUTOPLAYLIST_ID', 'AUTOPLAYLIST_REPEAT', 'OVERRIDE_INTRO_PLAYLIST', 'INTRO_PLAYLIST_ID', 'OVERRIDE_OUTRO_PLAYLIST', 'OUTRO_PLAYLIST_ID', ), + BasePeer::TYPE_FIELDNAME => array ('id', 'name', 'url', 'genre', 'description', 'color', 'background_color', 'live_stream_using_airtime_auth', 'live_stream_using_custom_auth', 'live_stream_user', 'live_stream_pass', 'linked', 'is_linkable', 'image_path', 'has_autoplaylist', 'autoplaylist_id', 'autoplaylist_repeat', 'override_intro_playlist', 'intro_playlist_id', 'override_outro_playlist', 'outro_playlist_id', ), + 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, ) ); /** @@ -123,12 +129,12 @@ abstract class BaseCcShowPeer * e.g. CcShowPeer::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0 */ protected static $fieldKeys = array ( - BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbName' => 1, 'DbUrl' => 2, 'DbGenre' => 3, 'DbDescription' => 4, 'DbColor' => 5, 'DbBackgroundColor' => 6, 'DbLiveStreamUsingAirtimeAuth' => 7, 'DbLiveStreamUsingCustomAuth' => 8, 'DbLiveStreamUser' => 9, 'DbLiveStreamPass' => 10, 'DbLinked' => 11, 'DbIsLinkable' => 12, 'DbImagePath' => 13, 'DbHasAutoPlaylist' => 14, 'DbAutoPlaylistId' => 15, 'DbAutoPlaylistRepeat' => 16, 'DbIntroPlaylistId' => 17, 'DbOutroPlaylistId' => 18, ), - BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbName' => 1, 'dbUrl' => 2, 'dbGenre' => 3, 'dbDescription' => 4, 'dbColor' => 5, 'dbBackgroundColor' => 6, 'dbLiveStreamUsingAirtimeAuth' => 7, 'dbLiveStreamUsingCustomAuth' => 8, 'dbLiveStreamUser' => 9, 'dbLiveStreamPass' => 10, 'dbLinked' => 11, 'dbIsLinkable' => 12, 'dbImagePath' => 13, 'dbHasAutoPlaylist' => 14, 'dbAutoPlaylistId' => 15, 'dbAutoPlaylistRepeat' => 16, 'dbIntroPlaylistId' => 17, 'dbOutroPlaylistId' => 18, ), - BasePeer::TYPE_COLNAME => array (CcShowPeer::ID => 0, CcShowPeer::NAME => 1, CcShowPeer::URL => 2, CcShowPeer::GENRE => 3, CcShowPeer::DESCRIPTION => 4, CcShowPeer::COLOR => 5, CcShowPeer::BACKGROUND_COLOR => 6, CcShowPeer::LIVE_STREAM_USING_AIRTIME_AUTH => 7, CcShowPeer::LIVE_STREAM_USING_CUSTOM_AUTH => 8, CcShowPeer::LIVE_STREAM_USER => 9, CcShowPeer::LIVE_STREAM_PASS => 10, CcShowPeer::LINKED => 11, CcShowPeer::IS_LINKABLE => 12, CcShowPeer::IMAGE_PATH => 13, CcShowPeer::HAS_AUTOPLAYLIST => 14, CcShowPeer::AUTOPLAYLIST_ID => 15, CcShowPeer::AUTOPLAYLIST_REPEAT => 16, CcShowPeer::INTRO_PLAYLIST_ID => 17, CcShowPeer::OUTRO_PLAYLIST_ID => 18, ), - BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'NAME' => 1, 'URL' => 2, 'GENRE' => 3, 'DESCRIPTION' => 4, 'COLOR' => 5, 'BACKGROUND_COLOR' => 6, 'LIVE_STREAM_USING_AIRTIME_AUTH' => 7, 'LIVE_STREAM_USING_CUSTOM_AUTH' => 8, 'LIVE_STREAM_USER' => 9, 'LIVE_STREAM_PASS' => 10, 'LINKED' => 11, 'IS_LINKABLE' => 12, 'IMAGE_PATH' => 13, 'HAS_AUTOPLAYLIST' => 14, 'AUTOPLAYLIST_ID' => 15, 'AUTOPLAYLIST_REPEAT' => 16, 'INTRO_PLAYLIST_ID' => 17, 'OUTRO_PLAYLIST_ID' => 18, ), - BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'name' => 1, 'url' => 2, 'genre' => 3, 'description' => 4, 'color' => 5, 'background_color' => 6, 'live_stream_using_airtime_auth' => 7, 'live_stream_using_custom_auth' => 8, 'live_stream_user' => 9, 'live_stream_pass' => 10, 'linked' => 11, 'is_linkable' => 12, 'image_path' => 13, 'has_autoplaylist' => 14, 'autoplaylist_id' => 15, 'autoplaylist_repeat' => 16, 'intro_playlist_id' => 17, 'outro_playlist_id' => 18, ), - BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, ) + BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbName' => 1, 'DbUrl' => 2, 'DbGenre' => 3, 'DbDescription' => 4, 'DbColor' => 5, 'DbBackgroundColor' => 6, 'DbLiveStreamUsingAirtimeAuth' => 7, 'DbLiveStreamUsingCustomAuth' => 8, 'DbLiveStreamUser' => 9, 'DbLiveStreamPass' => 10, 'DbLinked' => 11, 'DbIsLinkable' => 12, 'DbImagePath' => 13, 'DbHasAutoPlaylist' => 14, 'DbAutoPlaylistId' => 15, 'DbAutoPlaylistRepeat' => 16, 'DbOverrideIntroPlaylist' => 17, 'DbIntroPlaylistId' => 18, 'DbOverrideOutroPlaylist' => 19, 'DbOutroPlaylistId' => 20, ), + BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbName' => 1, 'dbUrl' => 2, 'dbGenre' => 3, 'dbDescription' => 4, 'dbColor' => 5, 'dbBackgroundColor' => 6, 'dbLiveStreamUsingAirtimeAuth' => 7, 'dbLiveStreamUsingCustomAuth' => 8, 'dbLiveStreamUser' => 9, 'dbLiveStreamPass' => 10, 'dbLinked' => 11, 'dbIsLinkable' => 12, 'dbImagePath' => 13, 'dbHasAutoPlaylist' => 14, 'dbAutoPlaylistId' => 15, 'dbAutoPlaylistRepeat' => 16, 'dbOverrideIntroPlaylist' => 17, 'dbIntroPlaylistId' => 18, 'dbOverrideOutroPlaylist' => 19, 'dbOutroPlaylistId' => 20, ), + BasePeer::TYPE_COLNAME => array (CcShowPeer::ID => 0, CcShowPeer::NAME => 1, CcShowPeer::URL => 2, CcShowPeer::GENRE => 3, CcShowPeer::DESCRIPTION => 4, CcShowPeer::COLOR => 5, CcShowPeer::BACKGROUND_COLOR => 6, CcShowPeer::LIVE_STREAM_USING_AIRTIME_AUTH => 7, CcShowPeer::LIVE_STREAM_USING_CUSTOM_AUTH => 8, CcShowPeer::LIVE_STREAM_USER => 9, CcShowPeer::LIVE_STREAM_PASS => 10, CcShowPeer::LINKED => 11, CcShowPeer::IS_LINKABLE => 12, CcShowPeer::IMAGE_PATH => 13, CcShowPeer::HAS_AUTOPLAYLIST => 14, CcShowPeer::AUTOPLAYLIST_ID => 15, CcShowPeer::AUTOPLAYLIST_REPEAT => 16, CcShowPeer::OVERRIDE_INTRO_PLAYLIST => 17, CcShowPeer::INTRO_PLAYLIST_ID => 18, CcShowPeer::OVERRIDE_OUTRO_PLAYLIST => 19, CcShowPeer::OUTRO_PLAYLIST_ID => 20, ), + BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'NAME' => 1, 'URL' => 2, 'GENRE' => 3, 'DESCRIPTION' => 4, 'COLOR' => 5, 'BACKGROUND_COLOR' => 6, 'LIVE_STREAM_USING_AIRTIME_AUTH' => 7, 'LIVE_STREAM_USING_CUSTOM_AUTH' => 8, 'LIVE_STREAM_USER' => 9, 'LIVE_STREAM_PASS' => 10, 'LINKED' => 11, 'IS_LINKABLE' => 12, 'IMAGE_PATH' => 13, 'HAS_AUTOPLAYLIST' => 14, 'AUTOPLAYLIST_ID' => 15, 'AUTOPLAYLIST_REPEAT' => 16, 'OVERRIDE_INTRO_PLAYLIST' => 17, 'INTRO_PLAYLIST_ID' => 18, 'OVERRIDE_OUTRO_PLAYLIST' => 19, 'OUTRO_PLAYLIST_ID' => 20, ), + BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'name' => 1, 'url' => 2, 'genre' => 3, 'description' => 4, 'color' => 5, 'background_color' => 6, 'live_stream_using_airtime_auth' => 7, 'live_stream_using_custom_auth' => 8, 'live_stream_user' => 9, 'live_stream_pass' => 10, 'linked' => 11, 'is_linkable' => 12, 'image_path' => 13, 'has_autoplaylist' => 14, 'autoplaylist_id' => 15, 'autoplaylist_repeat' => 16, 'override_intro_playlist' => 17, 'intro_playlist_id' => 18, 'override_outro_playlist' => 19, 'outro_playlist_id' => 20, ), + 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, ) ); /** @@ -219,7 +225,9 @@ abstract class BaseCcShowPeer $criteria->addSelectColumn(CcShowPeer::HAS_AUTOPLAYLIST); $criteria->addSelectColumn(CcShowPeer::AUTOPLAYLIST_ID); $criteria->addSelectColumn(CcShowPeer::AUTOPLAYLIST_REPEAT); + $criteria->addSelectColumn(CcShowPeer::OVERRIDE_INTRO_PLAYLIST); $criteria->addSelectColumn(CcShowPeer::INTRO_PLAYLIST_ID); + $criteria->addSelectColumn(CcShowPeer::OVERRIDE_OUTRO_PLAYLIST); $criteria->addSelectColumn(CcShowPeer::OUTRO_PLAYLIST_ID); } else { $criteria->addSelectColumn($alias . '.id'); @@ -239,7 +247,9 @@ abstract class BaseCcShowPeer $criteria->addSelectColumn($alias . '.has_autoplaylist'); $criteria->addSelectColumn($alias . '.autoplaylist_id'); $criteria->addSelectColumn($alias . '.autoplaylist_repeat'); + $criteria->addSelectColumn($alias . '.override_intro_playlist'); $criteria->addSelectColumn($alias . '.intro_playlist_id'); + $criteria->addSelectColumn($alias . '.override_outro_playlist'); $criteria->addSelectColumn($alias . '.outro_playlist_id'); } } diff --git a/legacy/application/models/airtime/om/BaseCcShowQuery.php b/legacy/application/models/airtime/om/BaseCcShowQuery.php index ded80c746..0445c121e 100644 --- a/legacy/application/models/airtime/om/BaseCcShowQuery.php +++ b/legacy/application/models/airtime/om/BaseCcShowQuery.php @@ -23,7 +23,9 @@ * @method CcShowQuery orderByDbHasAutoPlaylist($order = Criteria::ASC) Order by the has_autoplaylist column * @method CcShowQuery orderByDbAutoPlaylistId($order = Criteria::ASC) Order by the autoplaylist_id column * @method CcShowQuery orderByDbAutoPlaylistRepeat($order = Criteria::ASC) Order by the autoplaylist_repeat column + * @method CcShowQuery orderByDbOverrideIntroPlaylist($order = Criteria::ASC) Order by the override_intro_playlist column * @method CcShowQuery orderByDbIntroPlaylistId($order = Criteria::ASC) Order by the intro_playlist_id column + * @method CcShowQuery orderByDbOverrideOutroPlaylist($order = Criteria::ASC) Order by the override_outro_playlist column * @method CcShowQuery orderByDbOutroPlaylistId($order = Criteria::ASC) Order by the outro_playlist_id column * * @method CcShowQuery groupByDbId() Group by the id column @@ -43,7 +45,9 @@ * @method CcShowQuery groupByDbHasAutoPlaylist() Group by the has_autoplaylist column * @method CcShowQuery groupByDbAutoPlaylistId() Group by the autoplaylist_id column * @method CcShowQuery groupByDbAutoPlaylistRepeat() Group by the autoplaylist_repeat column + * @method CcShowQuery groupByDbOverrideIntroPlaylist() Group by the override_intro_playlist column * @method CcShowQuery groupByDbIntroPlaylistId() Group by the intro_playlist_id column + * @method CcShowQuery groupByDbOverrideOutroPlaylist() Group by the override_outro_playlist column * @method CcShowQuery groupByDbOutroPlaylistId() Group by the outro_playlist_id column * * @method CcShowQuery leftJoin($relation) Adds a LEFT JOIN clause to the query @@ -97,7 +101,9 @@ * @method CcShow findOneByDbHasAutoPlaylist(boolean $has_autoplaylist) Return the first CcShow filtered by the has_autoplaylist column * @method CcShow findOneByDbAutoPlaylistId(int $autoplaylist_id) Return the first CcShow filtered by the autoplaylist_id column * @method CcShow findOneByDbAutoPlaylistRepeat(boolean $autoplaylist_repeat) Return the first CcShow filtered by the autoplaylist_repeat column + * @method CcShow findOneByDbOverrideIntroPlaylist(boolean $override_intro_playlist) Return the first CcShow filtered by the override_intro_playlist column * @method CcShow findOneByDbIntroPlaylistId(int $intro_playlist_id) Return the first CcShow filtered by the intro_playlist_id column + * @method CcShow findOneByDbOverrideOutroPlaylist(boolean $override_outro_playlist) Return the first CcShow filtered by the override_outro_playlist column * @method CcShow findOneByDbOutroPlaylistId(int $outro_playlist_id) Return the first CcShow filtered by the outro_playlist_id column * * @method array findByDbId(int $id) Return CcShow objects filtered by the id column @@ -117,7 +123,9 @@ * @method array findByDbHasAutoPlaylist(boolean $has_autoplaylist) Return CcShow objects filtered by the has_autoplaylist column * @method array findByDbAutoPlaylistId(int $autoplaylist_id) Return CcShow objects filtered by the autoplaylist_id column * @method array findByDbAutoPlaylistRepeat(boolean $autoplaylist_repeat) Return CcShow objects filtered by the autoplaylist_repeat column + * @method array findByDbOverrideIntroPlaylist(boolean $override_intro_playlist) Return CcShow objects filtered by the override_intro_playlist column * @method array findByDbIntroPlaylistId(int $intro_playlist_id) Return CcShow objects filtered by the intro_playlist_id column + * @method array findByDbOverrideOutroPlaylist(boolean $override_outro_playlist) Return CcShow objects filtered by the override_outro_playlist column * @method array findByDbOutroPlaylistId(int $outro_playlist_id) Return CcShow objects filtered by the outro_playlist_id column * * @package propel.generator.airtime.om @@ -226,7 +234,7 @@ abstract class BaseCcShowQuery extends ModelCriteria */ protected function findPkSimple($key, $con) { - $sql = 'SELECT "id", "name", "url", "genre", "description", "color", "background_color", "live_stream_using_airtime_auth", "live_stream_using_custom_auth", "live_stream_user", "live_stream_pass", "linked", "is_linkable", "image_path", "has_autoplaylist", "autoplaylist_id", "autoplaylist_repeat", "intro_playlist_id", "outro_playlist_id" FROM "cc_show" WHERE "id" = :p0'; + $sql = 'SELECT "id", "name", "url", "genre", "description", "color", "background_color", "live_stream_using_airtime_auth", "live_stream_using_custom_auth", "live_stream_user", "live_stream_pass", "linked", "is_linkable", "image_path", "has_autoplaylist", "autoplaylist_id", "autoplaylist_repeat", "override_intro_playlist", "intro_playlist_id", "override_outro_playlist", "outro_playlist_id" FROM "cc_show" WHERE "id" = :p0'; try { $stmt = $con->prepare($sql); $stmt->bindValue(':p0', $key, PDO::PARAM_INT); @@ -824,6 +832,33 @@ abstract class BaseCcShowQuery extends ModelCriteria return $this->addUsingAlias(CcShowPeer::AUTOPLAYLIST_REPEAT, $dbAutoPlaylistRepeat, $comparison); } + /** + * Filter the query on the override_intro_playlist column + * + * Example usage: + * + * $query->filterByDbOverrideIntroPlaylist(true); // WHERE override_intro_playlist = true + * $query->filterByDbOverrideIntroPlaylist('yes'); // WHERE override_intro_playlist = true + * + * + * @param boolean|string $dbOverrideIntroPlaylist The value to use as filter. + * Non-boolean arguments are converted using the following rules: + * * 1, '1', 'true', 'on', and 'yes' are converted to boolean true + * * 0, '0', 'false', 'off', and 'no' are converted to boolean false + * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return CcShowQuery The current query, for fluid interface + */ + public function filterByDbOverrideIntroPlaylist($dbOverrideIntroPlaylist = null, $comparison = null) + { + if (is_string($dbOverrideIntroPlaylist)) { + $dbOverrideIntroPlaylist = in_array(strtolower($dbOverrideIntroPlaylist), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true; + } + + return $this->addUsingAlias(CcShowPeer::OVERRIDE_INTRO_PLAYLIST, $dbOverrideIntroPlaylist, $comparison); + } + /** * Filter the query on the intro_playlist_id column * @@ -868,6 +903,33 @@ abstract class BaseCcShowQuery extends ModelCriteria return $this->addUsingAlias(CcShowPeer::INTRO_PLAYLIST_ID, $dbIntroPlaylistId, $comparison); } + /** + * Filter the query on the override_outro_playlist column + * + * Example usage: + * + * $query->filterByDbOverrideOutroPlaylist(true); // WHERE override_outro_playlist = true + * $query->filterByDbOverrideOutroPlaylist('yes'); // WHERE override_outro_playlist = true + * + * + * @param boolean|string $dbOverrideOutroPlaylist The value to use as filter. + * Non-boolean arguments are converted using the following rules: + * * 1, '1', 'true', 'on', and 'yes' are converted to boolean true + * * 0, '0', 'false', 'off', and 'no' are converted to boolean false + * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return CcShowQuery The current query, for fluid interface + */ + public function filterByDbOverrideOutroPlaylist($dbOverrideOutroPlaylist = null, $comparison = null) + { + if (is_string($dbOverrideOutroPlaylist)) { + $dbOverrideOutroPlaylist = in_array(strtolower($dbOverrideOutroPlaylist), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true; + } + + return $this->addUsingAlias(CcShowPeer::OVERRIDE_OUTRO_PLAYLIST, $dbOverrideOutroPlaylist, $comparison); + } + /** * Filter the query on the outro_playlist_id column * diff --git a/legacy/application/services/ShowFormService.php b/legacy/application/services/ShowFormService.php index a0509a573..d2a68404d 100644 --- a/legacy/application/services/ShowFormService.php +++ b/legacy/application/services/ShowFormService.php @@ -164,8 +164,8 @@ class Application_Service_ShowFormService 'add_show_has_autoplaylist' => $this->ccShow->getDbHasAutoPlaylist() ? 1 : 0, 'add_show_autoplaylist_id' => $this->ccShow->getDbAutoPlaylistId(), 'add_show_autoplaylist_repeat' => $this->ccShow->getDbAutoPlaylistRepeat(), - 'add_show_intro_playlist_id' => $this->ccShow->getDbIntroPlaylistId(), - 'add_show_outro_playlist_id' => $this->ccShow->getDbOutroPlaylistId(), + 'add_show_intro_playlist_id' => $this->ccShow->getDbOverrideIntroPlaylist() ? $this->ccShow->getDbIntroPlaylistId() : 0, + 'add_show_outro_playlist_id' => $this->ccShow->getDbOverrideOutroPlaylist() ? $this->ccShow->getDbOutroPlaylistId() : 0, ] ); } diff --git a/legacy/application/services/ShowService.php b/legacy/application/services/ShowService.php index 62f9230b2..be61e71ec 100644 --- a/legacy/application/services/ShowService.php +++ b/legacy/application/services/ShowService.php @@ -1667,9 +1667,13 @@ SQL; if ($showData['add_show_autoplaylist_id'] != '') { $ccShow->setDbAutoPlaylistId($showData['add_show_autoplaylist_id']); } + + $ccShow->setDbOverrideIntroPlaylist($showData['add_show_intro_playlist_id'] != 0); if ($showData['add_show_intro_playlist_id'] != '') { $ccShow->setDbIntroPlaylistId($showData['add_show_intro_playlist_id']); } + + $ccShow->setDbOverrideOutroPlaylist($showData['add_show_outro_playlist_id'] != 0); if ($showData['add_show_outro_playlist_id'] != '') { $ccShow->setDbOutroPlaylistId($showData['add_show_outro_playlist_id']); } diff --git a/legacy/build/schema.xml b/legacy/build/schema.xml index ec79a1501..64f4ee9fc 100644 --- a/legacy/build/schema.xml +++ b/legacy/build/schema.xml @@ -122,7 +122,9 @@ + + diff --git a/legacy/tests/application/models/database/datasets/test_checkOverlappingShows.yml b/legacy/tests/application/models/database/datasets/test_checkOverlappingShows.yml index 25c8b0cf1..f6fdd4217 100644 --- a/legacy/tests/application/models/database/datasets/test_checkOverlappingShows.yml +++ b/legacy/tests/application/models/database/datasets/test_checkOverlappingShows.yml @@ -16,7 +16,9 @@ cc_show: has_autoplaylist: false autoplaylist_id: null autoplaylist_repeat: false + override_intro_playlist: false intro_playlist_id: null + override_outro_playlist: false outro_playlist_id: null cc_show_days: - id: "1" diff --git a/legacy/tests/application/services/database/ShowServiceDbTest.php b/legacy/tests/application/services/database/ShowServiceDbTest.php index 1cbca47f9..a091e7d48 100644 --- a/legacy/tests/application/services/database/ShowServiceDbTest.php +++ b/legacy/tests/application/services/database/ShowServiceDbTest.php @@ -77,7 +77,9 @@ class ShowServiceDbTest extends Zend_Test_PHPUnit_DatabaseTestCase 'add_show_has_autoplaylist' => 0, 'add_show_autoplaylist_id' => null, 'add_show_autoplaylist_repeat' => 0, + 'add_show_override_intro_playlist' => 0, 'add_show_intro_playlist_id' => null, + 'add_show_override_outro_playlist' => 0, 'add_show_outro_playlist_id' => null, ]; diff --git a/legacy/tests/application/services/database/datasets/test_ccShowInsertedIntoDatabase.yml b/legacy/tests/application/services/database/datasets/test_ccShowInsertedIntoDatabase.yml index 925e4a3a9..daf65a263 100644 --- a/legacy/tests/application/services/database/datasets/test_ccShowInsertedIntoDatabase.yml +++ b/legacy/tests/application/services/database/datasets/test_ccShowInsertedIntoDatabase.yml @@ -16,5 +16,7 @@ cc_show: has_autoplaylist: false autoplaylist_id: null autoplaylist_repeat: false + override_intro_playlist: false intro_playlist_id: null + override_outro_playlist: false outro_playlist_id: null diff --git a/legacy/tests/application/services/database/datasets/test_changeRepeatDayUpdatesScheduleCorrectly.yml b/legacy/tests/application/services/database/datasets/test_changeRepeatDayUpdatesScheduleCorrectly.yml index 590908e01..e57c01a78 100644 --- a/legacy/tests/application/services/database/datasets/test_changeRepeatDayUpdatesScheduleCorrectly.yml +++ b/legacy/tests/application/services/database/datasets/test_changeRepeatDayUpdatesScheduleCorrectly.yml @@ -16,7 +16,9 @@ cc_show: has_autoplaylist: false autoplaylist_id: null autoplaylist_repeat: false + override_intro_playlist: false intro_playlist_id: null + override_outro_playlist: false outro_playlist_id: null cc_show_days: - id: "2" diff --git a/legacy/tests/application/services/database/datasets/test_createBiWeeklyRepeatNoEndNoRRShow.yml b/legacy/tests/application/services/database/datasets/test_createBiWeeklyRepeatNoEndNoRRShow.yml index 70831a84b..08282649e 100644 --- a/legacy/tests/application/services/database/datasets/test_createBiWeeklyRepeatNoEndNoRRShow.yml +++ b/legacy/tests/application/services/database/datasets/test_createBiWeeklyRepeatNoEndNoRRShow.yml @@ -16,7 +16,9 @@ cc_show: has_autoplaylist: false autoplaylist_id: null autoplaylist_repeat: false + override_intro_playlist: false intro_playlist_id: null + override_outro_playlist: false outro_playlist_id: null cc_show_days: - id: "1" diff --git a/legacy/tests/application/services/database/datasets/test_createLinkedShow.yml b/legacy/tests/application/services/database/datasets/test_createLinkedShow.yml index 787ea6e54..7c89d4db9 100644 --- a/legacy/tests/application/services/database/datasets/test_createLinkedShow.yml +++ b/legacy/tests/application/services/database/datasets/test_createLinkedShow.yml @@ -16,7 +16,9 @@ cc_show: has_autoplaylist: false autoplaylist_id: null autoplaylist_repeat: false + override_intro_playlist: false intro_playlist_id: null + override_outro_playlist: false outro_playlist_id: null cc_show_days: - id: "1" diff --git a/legacy/tests/application/services/database/datasets/test_createMonthlyMonthlyRepeatNoEndNoRRShow.yml b/legacy/tests/application/services/database/datasets/test_createMonthlyMonthlyRepeatNoEndNoRRShow.yml index 46ec7c0e5..5a5ae1cc9 100644 --- a/legacy/tests/application/services/database/datasets/test_createMonthlyMonthlyRepeatNoEndNoRRShow.yml +++ b/legacy/tests/application/services/database/datasets/test_createMonthlyMonthlyRepeatNoEndNoRRShow.yml @@ -16,7 +16,9 @@ cc_show: has_autoplaylist: false autoplaylist_id: null autoplaylist_repeat: false + override_intro_playlist: false intro_playlist_id: null + override_outro_playlist: false outro_playlist_id: null cc_show_days: - id: "1" diff --git a/legacy/tests/application/services/database/datasets/test_createMonthlyWeeklyRepeatNoEndNoRRShow.yml b/legacy/tests/application/services/database/datasets/test_createMonthlyWeeklyRepeatNoEndNoRRShow.yml index 773b18bb7..3c71c985e 100644 --- a/legacy/tests/application/services/database/datasets/test_createMonthlyWeeklyRepeatNoEndNoRRShow.yml +++ b/legacy/tests/application/services/database/datasets/test_createMonthlyWeeklyRepeatNoEndNoRRShow.yml @@ -16,7 +16,9 @@ cc_show: has_autoplaylist: false autoplaylist_id: null autoplaylist_repeat: false + override_intro_playlist: false intro_playlist_id: null + override_outro_playlist: false outro_playlist_id: null cc_show_days: - id: "1" diff --git a/legacy/tests/application/services/database/datasets/test_createNoRepeatNoRRShow.yml b/legacy/tests/application/services/database/datasets/test_createNoRepeatNoRRShow.yml index 8cbdaa8fc..d3885e5ba 100644 --- a/legacy/tests/application/services/database/datasets/test_createNoRepeatNoRRShow.yml +++ b/legacy/tests/application/services/database/datasets/test_createNoRepeatNoRRShow.yml @@ -16,7 +16,9 @@ cc_show: has_autoplaylist: false autoplaylist_id: null autoplaylist_repeat: false + override_intro_playlist: false intro_playlist_id: null + override_outro_playlist: false outro_playlist_id: null cc_show_days: - id: "1" diff --git a/legacy/tests/application/services/database/datasets/test_createNoRepeatRRShow.yml b/legacy/tests/application/services/database/datasets/test_createNoRepeatRRShow.yml index 4b1b66c12..61c3ed24b 100644 --- a/legacy/tests/application/services/database/datasets/test_createNoRepeatRRShow.yml +++ b/legacy/tests/application/services/database/datasets/test_createNoRepeatRRShow.yml @@ -16,7 +16,9 @@ cc_show: has_autoplaylist: false autoplaylist_id: null autoplaylist_repeat: false + override_intro_playlist: false intro_playlist_id: null + override_outro_playlist: false outro_playlist_id: null cc_show_days: - id: "1" diff --git a/legacy/tests/application/services/database/datasets/test_createQuadWeeklyRepeatNoEndNoRRShow.yml b/legacy/tests/application/services/database/datasets/test_createQuadWeeklyRepeatNoEndNoRRShow.yml index 2fee53ddb..a50dadaa7 100644 --- a/legacy/tests/application/services/database/datasets/test_createQuadWeeklyRepeatNoEndNoRRShow.yml +++ b/legacy/tests/application/services/database/datasets/test_createQuadWeeklyRepeatNoEndNoRRShow.yml @@ -16,7 +16,9 @@ cc_show: has_autoplaylist: false autoplaylist_id: null autoplaylist_repeat: false + override_intro_playlist: false intro_playlist_id: null + override_outro_playlist: false outro_playlist_id: null cc_show_days: - id: "1" diff --git a/legacy/tests/application/services/database/datasets/test_createTriWeeklyRepeatNoEndNoRRShow.yml b/legacy/tests/application/services/database/datasets/test_createTriWeeklyRepeatNoEndNoRRShow.yml index 0ae2f072b..13f28703b 100644 --- a/legacy/tests/application/services/database/datasets/test_createTriWeeklyRepeatNoEndNoRRShow.yml +++ b/legacy/tests/application/services/database/datasets/test_createTriWeeklyRepeatNoEndNoRRShow.yml @@ -16,7 +16,9 @@ cc_show: has_autoplaylist: false autoplaylist_id: null autoplaylist_repeat: false + override_intro_playlist: false intro_playlist_id: null + override_outro_playlist: false outro_playlist_id: null cc_show_days: - id: "1" diff --git a/legacy/tests/application/services/database/datasets/test_createWeeklyRepeatNoEndNoRRShow.yml b/legacy/tests/application/services/database/datasets/test_createWeeklyRepeatNoEndNoRRShow.yml index 2c58bad5f..991f2c83c 100644 --- a/legacy/tests/application/services/database/datasets/test_createWeeklyRepeatNoEndNoRRShow.yml +++ b/legacy/tests/application/services/database/datasets/test_createWeeklyRepeatNoEndNoRRShow.yml @@ -16,7 +16,9 @@ cc_show: has_autoplaylist: false autoplaylist_id: null autoplaylist_repeat: false + override_intro_playlist: false intro_playlist_id: null + override_outro_playlist: false outro_playlist_id: null cc_show_days: - id: "1" diff --git a/legacy/tests/application/services/database/datasets/test_createWeeklyRepeatRRShow.yml b/legacy/tests/application/services/database/datasets/test_createWeeklyRepeatRRShow.yml index 75e85041d..a64b10a4f 100644 --- a/legacy/tests/application/services/database/datasets/test_createWeeklyRepeatRRShow.yml +++ b/legacy/tests/application/services/database/datasets/test_createWeeklyRepeatRRShow.yml @@ -16,7 +16,9 @@ cc_show: has_autoplaylist: false autoplaylist_id: null autoplaylist_repeat: false + override_intro_playlist: false intro_playlist_id: null + override_outro_playlist: false outro_playlist_id: null cc_show_days: - id: "1" diff --git a/legacy/tests/application/services/database/datasets/test_deleteShowInstance.yml b/legacy/tests/application/services/database/datasets/test_deleteShowInstance.yml index dcfc9d018..bc4313d79 100644 --- a/legacy/tests/application/services/database/datasets/test_deleteShowInstance.yml +++ b/legacy/tests/application/services/database/datasets/test_deleteShowInstance.yml @@ -16,7 +16,9 @@ cc_show: has_autoplaylist: false autoplaylist_id: null autoplaylist_repeat: false + override_intro_playlist: false intro_playlist_id: null + override_outro_playlist: false outro_playlist_id: null cc_show_days: - id: "1" diff --git a/legacy/tests/application/services/database/datasets/test_deleteShowInstanceAndAllFollowing.yml b/legacy/tests/application/services/database/datasets/test_deleteShowInstanceAndAllFollowing.yml index 7dbf90a55..4dc96bdd8 100644 --- a/legacy/tests/application/services/database/datasets/test_deleteShowInstanceAndAllFollowing.yml +++ b/legacy/tests/application/services/database/datasets/test_deleteShowInstanceAndAllFollowing.yml @@ -16,7 +16,9 @@ cc_show: has_autoplaylist: false autoplaylist_id: null autoplaylist_repeat: false + override_intro_playlist: false intro_playlist_id: null + override_outro_playlist: false outro_playlist_id: null cc_show_days: - id: "1" diff --git a/legacy/tests/application/services/database/datasets/test_editRepeatingShowChangeNoEndOption.yml b/legacy/tests/application/services/database/datasets/test_editRepeatingShowChangeNoEndOption.yml index 611f2ba19..f974deba9 100644 --- a/legacy/tests/application/services/database/datasets/test_editRepeatingShowChangeNoEndOption.yml +++ b/legacy/tests/application/services/database/datasets/test_editRepeatingShowChangeNoEndOption.yml @@ -16,7 +16,9 @@ cc_show: has_autoplaylist: false autoplaylist_id: null autoplaylist_repeat: false + override_intro_playlist: false intro_playlist_id: null + override_outro_playlist: false outro_playlist_id: null cc_show_days: - id: "1" diff --git a/legacy/tests/application/services/database/datasets/test_editRepeatingShowInstance.yml b/legacy/tests/application/services/database/datasets/test_editRepeatingShowInstance.yml index a7c121e51..a3ef3b291 100644 --- a/legacy/tests/application/services/database/datasets/test_editRepeatingShowInstance.yml +++ b/legacy/tests/application/services/database/datasets/test_editRepeatingShowInstance.yml @@ -16,7 +16,9 @@ cc_show: has_autoplaylist: false autoplaylist_id: null autoplaylist_repeat: false + override_intro_playlist: false intro_playlist_id: null + override_outro_playlist: false outro_playlist_id: null cc_show_days: - id: "1" diff --git a/legacy/tests/application/services/database/datasets/test_removeFirstRepeatShowDayUpdatesScheduleCorrectly.yml b/legacy/tests/application/services/database/datasets/test_removeFirstRepeatShowDayUpdatesScheduleCorrectly.yml index 590908e01..e57c01a78 100644 --- a/legacy/tests/application/services/database/datasets/test_removeFirstRepeatShowDayUpdatesScheduleCorrectly.yml +++ b/legacy/tests/application/services/database/datasets/test_removeFirstRepeatShowDayUpdatesScheduleCorrectly.yml @@ -16,7 +16,9 @@ cc_show: has_autoplaylist: false autoplaylist_id: null autoplaylist_repeat: false + override_intro_playlist: false intro_playlist_id: null + override_outro_playlist: false outro_playlist_id: null cc_show_days: - id: "2" diff --git a/legacy/tests/application/services/database/datasets/test_repeatShowCreationWhenUserMovesForwardInCalendar.yml b/legacy/tests/application/services/database/datasets/test_repeatShowCreationWhenUserMovesForwardInCalendar.yml index 1c84a3ec4..c575ca11b 100644 --- a/legacy/tests/application/services/database/datasets/test_repeatShowCreationWhenUserMovesForwardInCalendar.yml +++ b/legacy/tests/application/services/database/datasets/test_repeatShowCreationWhenUserMovesForwardInCalendar.yml @@ -16,7 +16,9 @@ cc_show: has_autoplaylist: false autoplaylist_id: null autoplaylist_repeat: false + override_intro_playlist: false intro_playlist_id: null + override_outro_playlist: false outro_playlist_id: null cc_show_days: - id: "1" diff --git a/legacy/tests/application/services/database/datasets/test_unlinkLinkedShow.yml b/legacy/tests/application/services/database/datasets/test_unlinkLinkedShow.yml index 99c735d66..c5f0b5624 100644 --- a/legacy/tests/application/services/database/datasets/test_unlinkLinkedShow.yml +++ b/legacy/tests/application/services/database/datasets/test_unlinkLinkedShow.yml @@ -16,7 +16,9 @@ cc_show: has_autoplaylist: false autoplaylist_id: null autoplaylist_repeat: false + override_intro_playlist: false intro_playlist_id: null + override_outro_playlist: false outro_playlist_id: null cc_show_days: - id: "1" diff --git a/legacy/tests/application/services/database/datasets/test_weeklyToBiWeekly.yml b/legacy/tests/application/services/database/datasets/test_weeklyToBiWeekly.yml index e389c2ad9..38b3c82b1 100644 --- a/legacy/tests/application/services/database/datasets/test_weeklyToBiWeekly.yml +++ b/legacy/tests/application/services/database/datasets/test_weeklyToBiWeekly.yml @@ -16,7 +16,9 @@ cc_show: has_autoplaylist: false autoplaylist_id: null autoplaylist_repeat: false + override_intro_playlist: false intro_playlist_id: null + override_outro_playlist: false outro_playlist_id: null cc_show_days: - id: "2" diff --git a/legacy/tests/application/services/database/datasets/test_weeklyToNoRepeat.yml b/legacy/tests/application/services/database/datasets/test_weeklyToNoRepeat.yml index f822541e3..335d0b251 100644 --- a/legacy/tests/application/services/database/datasets/test_weeklyToNoRepeat.yml +++ b/legacy/tests/application/services/database/datasets/test_weeklyToNoRepeat.yml @@ -16,7 +16,9 @@ cc_show: has_autoplaylist: false autoplaylist_id: null autoplaylist_repeat: false + override_intro_playlist: false intro_playlist_id: null + override_outro_playlist: false outro_playlist_id: null cc_show_days: - id: "2" diff --git a/legacy/tests/application/testdata/ShowServiceData.php b/legacy/tests/application/testdata/ShowServiceData.php index 2427201b7..49755f26f 100644 --- a/legacy/tests/application/testdata/ShowServiceData.php +++ b/legacy/tests/application/testdata/ShowServiceData.php @@ -21,7 +21,9 @@ class ShowServiceData 'add_show_has_autoplaylist' => false, 'add_show_autoplaylist_repeat' => false, 'add_show_autoplaylist_id' => null, + 'add_show_override_intro_playlist' => false, 'add_show_intro_playlist_id' => null, + 'add_show_override_outro_playlist' => false, 'add_show_outro_playlist_id' => null, 'add_show_repeats' => 0, 'add_show_linked' => 0, @@ -101,7 +103,9 @@ class ShowServiceData 'add_show_has_autoplaylist' => false, 'add_show_autoplaylist_repeat' => false, 'add_show_autoplaylist_id' => null, + 'add_show_override_intro_playlist' => false, 'add_show_intro_playlist_id' => null, + 'add_show_override_outro_playlist' => false, 'add_show_outro_playlist_id' => null, 'add_show_repeats' => 1, 'add_show_linked' => 0, @@ -181,7 +185,9 @@ class ShowServiceData 'add_show_has_autoplaylist' => false, 'add_show_autoplaylist_repeat' => false, 'add_show_autoplaylist_id' => null, + 'add_show_override_intro_playlist' => false, 'add_show_intro_playlist_id' => null, + 'add_show_override_outro_playlist' => false, 'add_show_outro_playlist_id' => null, 'add_show_repeats' => 1, 'add_show_linked' => 0, @@ -272,7 +278,9 @@ class ShowServiceData 'add_show_has_autoplaylist' => false, 'add_show_autoplaylist_repeat' => false, 'add_show_autoplaylist_id' => null, + 'add_show_override_intro_playlist' => false, 'add_show_intro_playlist_id' => null, + 'add_show_override_outro_playlist' => false, 'add_show_outro_playlist_id' => null, 'add_show_repeats' => 0, 'add_show_linked' => 0, @@ -303,7 +311,9 @@ class ShowServiceData 'add_show_has_autoplaylist' => false, 'add_show_autoplaylist_repeat' => false, 'add_show_autoplaylist_id' => null, + 'add_show_override_intro_playlist' => false, 'add_show_intro_playlist_id' => null, + 'add_show_override_outro_playlist' => false, 'add_show_outro_playlist_id' => null, 'add_show_repeats' => 1, 'add_show_linked' => 0, @@ -384,7 +394,9 @@ class ShowServiceData 'add_show_has_autoplaylist' => false, 'add_show_autoplaylist_repeat' => false, 'add_show_autoplaylist_id' => null, + 'add_show_override_intro_playlist' => false, 'add_show_intro_playlist_id' => null, + 'add_show_override_outro_playlist' => false, 'add_show_outro_playlist_id' => null, 'add_show_repeats' => 0, 'add_show_linked' => 0, @@ -464,7 +476,9 @@ class ShowServiceData 'add_show_has_autoplaylist' => false, 'add_show_autoplaylist_repeat' => false, 'add_show_autoplaylist_id' => null, + 'add_show_override_intro_playlist' => false, 'add_show_intro_playlist_id' => null, + 'add_show_override_outro_playlist' => false, 'add_show_outro_playlist_id' => null, 'add_show_repeats' => 1, 'add_show_linked' => 0,