Merge branch 'master' into CC-2301
This commit is contained in:
commit
3e320f1e2e
|
@ -660,6 +660,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
|
||||
|
@ -675,12 +681,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)
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
@ -198,22 +201,26 @@ 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) && ($this->isUpdate || $fillInstances)) {
|
||||
Application_Service_SchedulerService::fillLinkedShows(
|
||||
$this->ccShow);
|
||||
}
|
||||
return $this->ccShow;
|
||||
}
|
||||
|
||||
|
@ -230,6 +237,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);
|
||||
|
@ -789,6 +797,7 @@ SQL;
|
|||
if ($this->isUpdate) {
|
||||
$ccShowInstance = $this->getInstance($utcStartDateTime);
|
||||
}
|
||||
|
||||
$ccShowInstance->setDbShowId($this->ccShow->getDbId());
|
||||
$ccShowInstance->setDbStarts($utcStartDateTime);
|
||||
$ccShowInstance->setDbEnds($utcEndDateTime);
|
||||
|
@ -815,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
|
||||
|
@ -899,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)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue