From 5ba5864d8cb3afbcfd7b2f29802a3330b70016f5 Mon Sep 17 00:00:00 2001 From: denise Date: Wed, 1 May 2013 11:29:32 -0400 Subject: [PATCH 1/7] CC-5078: Wrong start time if dragging dynamic smart block into a show --- airtime_mvc/application/models/Scheduler.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/airtime_mvc/application/models/Scheduler.php b/airtime_mvc/application/models/Scheduler.php index 3778cf007..17888fe46 100644 --- a/airtime_mvc/application/models/Scheduler.php +++ b/airtime_mvc/application/models/Scheduler.php @@ -602,6 +602,12 @@ class Application_Model_Scheduler $nextStartDT = $endTimeDT; $pos++; + /* If we are adjusting start and end times for items + * after the insert location, we need to exclude the + * schedule item we just inserted because it has correct + * start and end times*/ + $excludeIds[] = $sched->getDbId(); + }//all files have been inserted/moved // update is_scheduled flag for each cc_file @@ -617,12 +623,6 @@ class Application_Model_Scheduler $filesToInsert = null; } - /* If we are adjusting start and end times for items - * after the insert location, we need to exclude the - * schedule item we just inserted because it has correct - * start and end times*/ - $excludeIds[] = $sched->getDbId(); - if ($adjustSched === true) { $followingSchedItems = CcScheduleQuery::create() ->filterByDBStarts($initalStartDT->format("Y-m-d H:i:s.u"), Criteria::GREATER_EQUAL) From ded8ceb86b0521833862b6e96a8d39b7689daf59 Mon Sep 17 00:00:00 2001 From: denise Date: Wed, 1 May 2013 14:40:33 -0400 Subject: [PATCH 2/7] CC-5082: Repeating shows "disappear" when switching calendar to next month We were trying to call a function on an object that was not set --- airtime_mvc/application/services/ShowService.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/airtime_mvc/application/services/ShowService.php b/airtime_mvc/application/services/ShowService.php index b5806a638..fc1d0ec11 100644 --- a/airtime_mvc/application/services/ShowService.php +++ b/airtime_mvc/application/services/ShowService.php @@ -778,6 +778,12 @@ SQL; */ private function createNonRepeatingInstance($showDay, $populateUntil) { + if (isset($this->ccShow)) { + $showId = $this->ccShow->getDbId(); + } else { + $showId = $showDay["show_id"]; + } + //DateTime object $start = $showDay->getLocalStartDateAndTime(); @@ -789,7 +795,7 @@ SQL; if ($this->isUpdate) { $ccShowInstance = $this->getInstance($utcStartDateTime); } - $ccShowInstance->setDbShowId($this->ccShow->getDbId()); + $ccShowInstance->setDbShowId($showId); $ccShowInstance->setDbStarts($utcStartDateTime); $ccShowInstance->setDbEnds($utcEndDateTime); $ccShowInstance->setDbRecord($showDay->getDbRecord()); From 3d61a182618c896179b7fce1a7c367122de851a4 Mon Sep 17 00:00:00 2001 From: denise Date: Wed, 1 May 2013 14:42:53 -0400 Subject: [PATCH 3/7] CC-5082: Repeating shows "disappear" when switching calendar to next month Small fix. Was treating object as an array --- airtime_mvc/application/services/ShowService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airtime_mvc/application/services/ShowService.php b/airtime_mvc/application/services/ShowService.php index fc1d0ec11..c15b49d7d 100644 --- a/airtime_mvc/application/services/ShowService.php +++ b/airtime_mvc/application/services/ShowService.php @@ -781,7 +781,7 @@ SQL; if (isset($this->ccShow)) { $showId = $this->ccShow->getDbId(); } else { - $showId = $showDay["show_id"]; + $showId = $showDay->getDbShowId(); } //DateTime object From 09754b20cc52f0c308f4fc313fe7d9d5dcf82994 Mon Sep 17 00:00:00 2001 From: denise Date: Wed, 1 May 2013 15:20:55 -0400 Subject: [PATCH 4/7] CC-5082: Repeating shows "disappear" when switching calendar to next month This was caused by the calendar trying to re-create single instance shows. We needed to exclude non-repeating shows when populating the calendar with repeat events --- airtime_mvc/application/services/ShowService.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/airtime_mvc/application/services/ShowService.php b/airtime_mvc/application/services/ShowService.php index c15b49d7d..103f0a7f9 100644 --- a/airtime_mvc/application/services/ShowService.php +++ b/airtime_mvc/application/services/ShowService.php @@ -230,6 +230,7 @@ class Application_Service_ShowService $c = new Criteria(); $c->add(CcShowDaysPeer::FIRST_SHOW, $endTimeString, Criteria::LESS_THAN); $c->addAnd(CcShowDaysPeer::LAST_SHOW, $startTimeString, Criteria::GREATER_THAN); + $c->addAnd(CcShowDaysPeer::REPEAT_TYPE, -1, Criteria::NOT_EQUAL); $c->addOr(CcShowDaysPeer::LAST_SHOW, null, Criteria::ISNULL); return CcShowDaysPeer::doSelect($c); @@ -778,12 +779,6 @@ SQL; */ private function createNonRepeatingInstance($showDay, $populateUntil) { - if (isset($this->ccShow)) { - $showId = $this->ccShow->getDbId(); - } else { - $showId = $showDay->getDbShowId(); - } - //DateTime object $start = $showDay->getLocalStartDateAndTime(); @@ -795,7 +790,8 @@ SQL; if ($this->isUpdate) { $ccShowInstance = $this->getInstance($utcStartDateTime); } - $ccShowInstance->setDbShowId($showId); + + $ccShowInstance->setDbShowId($this->ccShow->getDbId()); $ccShowInstance->setDbStarts($utcStartDateTime); $ccShowInstance->setDbEnds($utcEndDateTime); $ccShowInstance->setDbRecord($showDay->getDbRecord()); From ea73d98c4904d39335b5dbb04368340fd6860adb Mon Sep 17 00:00:00 2001 From: denise Date: Thu, 2 May 2013 11:40:56 -0400 Subject: [PATCH 5/7] CC-5075: Future bi-weekly linked shows don't get filled with content sometimes --- airtime_mvc/application/services/ShowService.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/airtime_mvc/application/services/ShowService.php b/airtime_mvc/application/services/ShowService.php index 103f0a7f9..66885ac14 100644 --- a/airtime_mvc/application/services/ShowService.php +++ b/airtime_mvc/application/services/ShowService.php @@ -183,6 +183,9 @@ class Application_Service_ShowService if (is_null($this->ccShow)) { $ccShowDays = $this->getShowDaysInRange($populateUntil, $end); + if (count($ccShowDays) > 0) { + $this->ccShow = $ccShowDays[0]->getCcShow(); + } } else { $ccShowDays = $this->ccShow->getCcShowDays(); } @@ -214,6 +217,10 @@ class Application_Service_ShowService } } + if (isset($this->ccShow) && $fillInstances) { + Application_Service_SchedulerService::fillLinkedShows( + $this->ccShow); + } return $this->ccShow; } @@ -901,11 +908,6 @@ SQL; $utcStartDateTime->setTimezone(new DateTimeZone(Application_Model_Preference::GetTimezone())); $nextDate = $utcStartDateTime->add($repeatInterval); $this->setNextRepeatingShowDate($nextDate->format("Y-m-d"), $day, $show_id); - - if ($fillInstances) { - Application_Service_SchedulerService::fillLinkedShows( - $showDay->getCcShow()); - } } private function createMonthlyMonthlyRepeatInstances($showDay, $populateUntil) From 0e5ba2f07f4ee3c2fa1121b9a695d237235b381f Mon Sep 17 00:00:00 2001 From: denise Date: Thu, 2 May 2013 15:36:14 -0400 Subject: [PATCH 6/7] CC-5085: Linked show: Changing a regular show to linked show and updating the weekday, all the contents will lost --- airtime_mvc/application/models/airtime/CcShow.php | 11 +++++++++-- airtime_mvc/application/services/ShowService.php | 12 ++++++------ 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/airtime_mvc/application/models/airtime/CcShow.php b/airtime_mvc/application/models/airtime/CcShow.php index 5e300f00c..1ccbbcf92 100644 --- a/airtime_mvc/application/models/airtime/CcShow.php +++ b/airtime_mvc/application/models/airtime/CcShow.php @@ -155,7 +155,14 @@ class CcShow extends BaseCcShow { */ public function getCcShowInstancess($criteria = null, PropelPDO $con = null) { - if(null === $this->collCcShowInstancess || null !== $criteria) { + return CcShowInstancesQuery::create(null, $criteria) + ->filterByCcShow($this) + ->filterByDbModifiedInstance(false) + ->filterByDbEnds(gmdate("Y-m-d H:i:s"), criteria::GREATER_THAN) + ->orderByDbId() + ->find($con); + + /*if(null === $this->collCcShowInstancess || null !== $criteria) { if ($this->isNew() && null === $this->collCcShowInstancess) { // return empty collection $this->initCcShowInstancess(); @@ -172,7 +179,7 @@ class CcShow extends BaseCcShow { $this->collCcShowInstancess = $collCcShowInstancess; } } - return $this->collCcShowInstancess; + return $this->collCcShowInstancess;*/ } public function getInstanceIds() { diff --git a/airtime_mvc/application/services/ShowService.php b/airtime_mvc/application/services/ShowService.php index 66885ac14..32aeb5da9 100644 --- a/airtime_mvc/application/services/ShowService.php +++ b/airtime_mvc/application/services/ShowService.php @@ -201,23 +201,23 @@ class Application_Service_ShowService break; case REPEAT_WEEKLY: $this->createRepeatingInstances($day, $populateUntil, REPEAT_WEEKLY, - new DateInterval("P7D"), $daysAdded, $fillInstances); + new DateInterval("P7D"), $daysAdded); break; case REPEAT_BI_WEEKLY: $this->createRepeatingInstances($day, $populateUntil, REPEAT_BI_WEEKLY, - new DateInterval("P14D"), $daysAdded, $fillInstances); + new DateInterval("P14D"), $daysAdded); break; case REPEAT_MONTHLY_MONTHLY: - $this->createMonthlyMonthlyRepeatInstances($day, $populateUntil, $fillInstances); + $this->createMonthlyMonthlyRepeatInstances($day, $populateUntil); break; case REPEAT_MONTHLY_WEEKLY: $this->createRepeatingInstances($day, $populateUntil, REPEAT_MONTHLY_WEEKLY, - null, $daysAdded, $fillInstances); + null, $daysAdded); break; } } - if (isset($this->ccShow) && $fillInstances) { + if (isset($this->ccShow) && ($this->isUpdate || $fillInstances)) { Application_Service_SchedulerService::fillLinkedShows( $this->ccShow); } @@ -824,7 +824,7 @@ SQL; * @param unknown_type $isRebroadcast */ private function createRepeatingInstances($showDay, $populateUntil, - $repeatType, $repeatInterval, $daysAdded=null, $fillInstances) + $repeatType, $repeatInterval, $daysAdded=null) { $show_id = $showDay->getDbShowId(); $first_show = $showDay->getDbFirstShow(); //non-UTC From f2564cf732538afe83e68911486ac67891803296 Mon Sep 17 00:00:00 2001 From: Martin Konecny Date: Thu, 2 May 2013 16:09:04 -0400 Subject: [PATCH 7/7] temporarily disable opus + aac until liquidsoap binaries are ready --- .../pypo/liquidsoap_scripts/ls_lib.liq | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/python_apps/pypo/liquidsoap_scripts/ls_lib.liq b/python_apps/pypo/liquidsoap_scripts/ls_lib.liq index 9afa28db9..4c078914c 100644 --- a/python_apps/pypo/liquidsoap_scripts/ls_lib.liq +++ b/python_apps/pypo/liquidsoap_scripts/ls_lib.liq @@ -126,12 +126,12 @@ def output_to(output_type, type, bitrate, host, port, pass, mount_point, url, de %include "mp3.liq" elsif type == "ogg" then %include "ogg.liq" - elsif type == "opus" then - %include "opus.liq" - elsif type == "aac" then - %include "aac.liq" - else - %include "aacplus.liq" + #elsif type == "opus" then + # %include "opus.liq" + #elsif type == "aac" then + # %include "aac.liq" + #else + # %include "aacplus.liq" end else user_ref = ref user @@ -165,10 +165,10 @@ def output_to(output_type, type, bitrate, host, port, pass, mount_point, url, de if type == "mp3" then %include "mp3.liq" - elsif type == "aac" then - %include "aac.liq" - else - %include "aacplus.liq" + #elsif type == "aac" then + # %include "aac.liq" + #else + # %include "aacplus.liq" end end end