From f4c2ac4940437aed335aac103ebf4853d355c42c Mon Sep 17 00:00:00 2001 From: vexorian Date: Sat, 15 Aug 2020 18:17:37 -0400 Subject: [PATCH] Now really fix the bug that made playing videos shorter than 10 seconds loop permanently. --- src/channel-cache.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/channel-cache.js b/src/channel-cache.js index d6b03f0..4af4272 100644 --- a/src/channel-cache.js +++ b/src/channel-cache.js @@ -27,7 +27,7 @@ function getCurrentLineupItem(channelId, t1) { let recorded = cache[channelId]; let lineupItem = JSON.parse( JSON.stringify(recorded.lineupItem) ); let diff = t1 - recorded.t0; - if (diff <= SLACK) { + if ( (diff <= SLACK) && (lineupItem.actualDuration >= 2*SLACK) ) { //closed the stream and opened it again let's not lose seconds for //no reason return lineupItem;