aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/views
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2023-05-10 14:23:59 +0200
committerChocobozzz <me@florianbigard.com>2023-05-10 14:23:59 +0200
commit7815dc450ea9f8fd63e2234b6215013a132e6229 (patch)
treefaee269ef011930dd71d52035cdd2af8e6f2b004 /server/lib/views
parentbc3bd960e3d240a1a02bbda7530659424ad70685 (diff)
downloadPeerTube-7815dc450ea9f8fd63e2234b6215013a132e6229.tar.gz
PeerTube-7815dc450ea9f8fd63e2234b6215013a132e6229.tar.zst
PeerTube-7815dc450ea9f8fd63e2234b6215013a132e6229.zip
Prevent invalid end watch section warnings
Diffstat (limited to 'server/lib/views')
-rw-r--r--server/lib/views/shared/video-viewer-stats.ts7
1 files changed, 6 insertions, 1 deletions
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 {
106 const lastSection = stats.watchSections[stats.watchSections.length - 1] 106 const lastSection = stats.watchSections[stats.watchSections.length - 1]
107 107
108 if (lastSection.start > currentTime) { 108 if (lastSection.start > currentTime) {
109 logger.warn('Invalid end watch section %d. Last start record was at %d.', currentTime, lastSection.start) 109 logger.debug('Invalid end watch section %d. Last start record was at %d. Starting a new section.', currentTime, lastSection.start)
110
111 stats.watchSections.push({
112 start: currentTime,
113 end: currentTime
114 })
110 } else { 115 } else {
111 lastSection.end = currentTime 116 lastSection.end = currentTime
112 } 117 }