Merge branch 'dev/1.2.x' into dev/1.3.x

This commit is contained in:
vexorian 2021-02-18 09:06:07 -04:00
commit 33f8d59959
2 changed files with 4 additions and 2 deletions

View File

@ -83,7 +83,7 @@ function createLineup(obj, channel, fillers, isFirst) {
if ( (channel.offlineMode === 'clip') && (channel.fallback.length != 0) ) {
special = JSON.parse(JSON.stringify(channel.fallback[0]));
}
let randomResult = pickRandomWithMaxDuration(channel, fillers, remaining + (isFirst? (24*60*60*1000) : 0) );
let randomResult = pickRandomWithMaxDuration(channel, fillers, remaining + (isFirst? (7*24*60*60*1000) : 0) );
filler = randomResult.filler;
if (filler == null && (typeof(randomResult.minimumWait) !== undefined) && (remaining > randomResult.minimumWait) ) {
remaining = randomResult.minimumWait;
@ -169,7 +169,7 @@ function pickRandomWithMaxDuration(channel, fillers, maxDuration) {
let pick2 = null;
let t0 = (new Date()).getTime();
let minimumWait = 1000000000;
const D = 24*60*60*1000;
const D = 7*24*60*60*1000;
if (typeof(channel.fillerRepeatCooldown) === 'undefined') {
channel.fillerRepeatCooldown = 30*60*1000;
}

View File

@ -1468,6 +1468,7 @@ module.exports = function ($timeout, $location, dizquetv, resolutionOptions) {
scope.rerunBlockSize = -1;
scope.rerunBlockSizes = [
{ id: -1, description: "Block" },
{ id: 4, description: "4 Hours" },
{ id: 6, description: "6 Hours" },
{ id: 8, description: "8 Hours" },
{ id: 12, description: "12 Hours" },
@ -1478,6 +1479,7 @@ module.exports = function ($timeout, $location, dizquetv, resolutionOptions) {
{ id: 2, description: "2" },
{ id: 3, description: "3" },
{ id: 4, description: "4" },
{ id: 6, description: "6" },
];
scope.rerunsDisabled = () => {
return scope.rerunStart == -1 || scope.rerunBlockSize == -1 || scope.rerunRepeats == -1