/** * Add a playlist as the last item of the current show. * * @param int $plId * Playlist ID. */ public function addPlaylistToShow($plId) { $sched = new ScheduleGroup(); $lastGroupId = $this->getLastGroupId(); if (is_null($lastGroupId)) { $groupId = $sched->add($this->_instanceId, $this->getShowStart(), null, $plId); } else { $groupId = $sched->addPlaylistAfter($this->_instanceId, $lastGroupId, $plId); } RabbitMq::PushSchedule(); $this->updateScheduledTime(); }