Now really fix the bug that made playing videos shorter than 10 seconds loop permanently.

This commit is contained in:
vexorian 2020-08-15 18:17:37 -04:00
parent 05a8b2c4af
commit f4c2ac4940

View File

@ -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;