trying different things for autoplaylist

This commit is contained in:
Robbt 2019-01-21 11:06:04 -05:00
parent f9a5da2ba3
commit 8de94a670f
4 changed files with 16 additions and 3 deletions

View file

@ -46,7 +46,17 @@ class AutoPlaylistManager {
while(!$full) {
$si = new Application_Model_ShowInstance($autoplaylist->getDbId());
$ps = $si->getPercentScheduled();
if ($introplaylistid != null) {
sleep(20);
Logging::info('adding intro');
$si->addPlaylistToShowStart($introplaylistid, false);
}
if ($outroplaylistid != null) {
sleep(20);
Logging::info('adding outro');
$si->addPlaylistToShow($outroplaylistid, false);
//Logging::info("The total percent scheduled is % $ps");
}
if ($ps > 100) {
$full = true;
}
@ -56,9 +66,13 @@ class AutoPlaylistManager {
else {
$si->addPlaylistToShow($playlistid, false);
if ($introplaylistid != null) {
sleep(20);
Logging::info('adding intro');
$si->addPlaylistToShowStart($introplaylistid, false);
}
if ($outroplaylistid != null) {
sleep(20);
Logging::info('adding outro');
$si->addPlaylistToShow($outroplaylistid, false);
}
}

View file

@ -5,6 +5,7 @@ class LibraryController extends Zend_Controller_Action
public function init()
{
Logging::info('debugging wtf');
$ajaxContext = $this->_helper->getHelper('AjaxContext');
$ajaxContext->addActionContext('contents-feed', 'json')
->addActionContext('delete', 'json')

View file

@ -1644,7 +1644,6 @@ SQL;
// construct limit restriction
$limits = array();
if (isset($storedCrit['limit'])) {
if ($storedCrit['limit']['modifier'] == "items") {
$limits['time'] = 1440 * 60;

View file

@ -214,7 +214,6 @@ final class Application_Model_Scheduler
private function retrieveMediaFiles($id, $type, $show)
{
$files = array();
if ($type === "audioclip") {
$file = CcFilesQuery::create()->findPK($id, $this->con);