aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video/video.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-03-24 13:36:47 +0100
committerChocobozzz <chocobozzz@cpy.re>2022-04-15 09:49:35 +0200
commitb211106695bb82f6c32e53306081b5262c3d109d (patch)
treefa187de1c33b0956665f5362e29af6b0f6d8bb57 /server/models/video/video.ts
parent69d48ee30c9d47cddf0c3c047dc99a99dcb6e894 (diff)
downloadPeerTube-b211106695bb82f6c32e53306081b5262c3d109d.tar.gz
PeerTube-b211106695bb82f6c32e53306081b5262c3d109d.tar.zst
PeerTube-b211106695bb82f6c32e53306081b5262c3d109d.zip
Support video views/viewers stats in server
* Add "currentTime" and "event" body params to view endpoint * Merge watching and view endpoints * Introduce WatchAction AP activity * Add tables to store viewer information of local videos * Add endpoints to fetch video views/viewers stats of local videos * Refactor views/viewers handlers * Support "views" and "viewers" counters for both VOD and live videos
Diffstat (limited to 'server/models/video/video.ts')
-rw-r--r--server/models/video/video.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/models/video/video.ts b/server/models/video/video.ts
index 8bad2a01e..13d81561a 100644
--- a/server/models/video/video.ts
+++ b/server/models/video/video.ts
@@ -106,6 +106,7 @@ import { setAsUpdated } from '../shared'
106import { UserModel } from '../user/user' 106import { UserModel } from '../user/user'
107import { UserVideoHistoryModel } from '../user/user-video-history' 107import { UserVideoHistoryModel } from '../user/user-video-history'
108import { buildTrigramSearchIndex, buildWhereIdOrUUID, getVideoSort, isOutdated, throwIfNotValid } from '../utils' 108import { buildTrigramSearchIndex, buildWhereIdOrUUID, getVideoSort, isOutdated, throwIfNotValid } from '../utils'
109import { VideoViewModel } from '../view/video-view'
109import { 110import {
110 videoFilesModelToFormattedJSON, 111 videoFilesModelToFormattedJSON,
111 VideoFormattingJSONOptions, 112 VideoFormattingJSONOptions,
@@ -135,7 +136,6 @@ import { VideoPlaylistElementModel } from './video-playlist-element'
135import { VideoShareModel } from './video-share' 136import { VideoShareModel } from './video-share'
136import { VideoStreamingPlaylistModel } from './video-streaming-playlist' 137import { VideoStreamingPlaylistModel } from './video-streaming-playlist'
137import { VideoTagModel } from './video-tag' 138import { VideoTagModel } from './video-tag'
138import { VideoViewModel } from './video-view'
139 139
140export enum ScopeNames { 140export enum ScopeNames {
141 FOR_API = 'FOR_API', 141 FOR_API = 'FOR_API',