diff options
Diffstat (limited to 'server/lib/views/shared')
-rw-r--r-- | server/lib/views/shared/video-viewer-stats.ts | 7 |
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 542bd51cf..39e34fb90 100644 --- a/server/lib/views/shared/video-viewer-stats.ts +++ b/server/lib/views/shared/video-viewer-stats.ts | |||
@@ -104,7 +104,12 @@ export class VideoViewerStats { | |||
104 | }) | 104 | }) |
105 | } else { | 105 | } else { |
106 | const lastSection = stats.watchSections[stats.watchSections.length - 1] | 106 | const lastSection = stats.watchSections[stats.watchSections.length - 1] |
107 | lastSection.end = currentTime | 107 | |
108 | if (lastSection.start > currentTime) { | ||
109 | logger.warn('Invalid end watch section %d. Last start record was at %d.', currentTime, lastSection.start) | ||
110 | } else { | ||
111 | lastSection.end = currentTime | ||
112 | } | ||
108 | } | 113 | } |
109 | 114 | ||
110 | stats.watchTime = this.buildWatchTimeFromSections(stats.watchSections) | 115 | stats.watchTime = this.buildWatchTimeFromSections(stats.watchSections) |