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();
//Logging::info("The total percent scheduled is % $ps");
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);
}
}