From 7815dc450ea9f8fd63e2234b6215013a132e6229 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 10 May 2023 14:23:59 +0200 Subject: Prevent invalid end watch section warnings --- server/lib/views/shared/video-viewer-stats.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'server/lib') diff --git a/server/lib/views/shared/video-viewer-stats.ts b/server/lib/views/shared/video-viewer-stats.ts index 39e34fb90..ebd963e59 100644 --- a/server/lib/views/shared/video-viewer-stats.ts +++ b/server/lib/views/shared/video-viewer-stats.ts @@ -106,7 +106,12 @@ export class VideoViewerStats { const lastSection = stats.watchSections[stats.watchSections.length - 1] if (lastSection.start > currentTime) { - logger.warn('Invalid end watch section %d. Last start record was at %d.', currentTime, lastSection.start) + logger.debug('Invalid end watch section %d. Last start record was at %d. Starting a new section.', currentTime, lastSection.start) + + stats.watchSections.push({ + start: currentTime, + end: currentTime + }) } else { lastSection.end = currentTime } -- cgit v1.2.3