From 47b2fe8dd4369de1c94f4f2e48c1c7d6dc3e0b68 Mon Sep 17 00:00:00 2001 From: vexorian Date: Mon, 15 Feb 2021 10:06:10 -0400 Subject: [PATCH] Max time for last-played is 7 days up from 24. I think this makes flex work nicer when the dizquetv session is long. But it's subjective. --- src/helperFuncs.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/helperFuncs.js b/src/helperFuncs.js index abae7d0..df9915d 100644 --- a/src/helperFuncs.js +++ b/src/helperFuncs.js @@ -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; }