]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/views/shared/video-viewer-stats.ts
Bumped to version v5.2.1
[github/Chocobozzz/PeerTube.git] / server / lib / views / shared / video-viewer-stats.ts
index 39e34fb9095d9c303242beb93e87c3dcb3bc0b28..ebd963e598f57e90a4939f672d715a15d2693d54 100644 (file)
@@ -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
       }