diff options
author | Chocobozzz <me@florianbigard.com> | 2022-03-24 13:36:47 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2022-04-15 09:49:35 +0200 |
commit | b211106695bb82f6c32e53306081b5262c3d109d (patch) | |
tree | fa187de1c33b0956665f5362e29af6b0f6d8bb57 /server/models/video/video.ts | |
parent | 69d48ee30c9d47cddf0c3c047dc99a99dcb6e894 (diff) | |
download | PeerTube-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.ts | 2 |
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' | |||
106 | import { UserModel } from '../user/user' | 106 | import { UserModel } from '../user/user' |
107 | import { UserVideoHistoryModel } from '../user/user-video-history' | 107 | import { UserVideoHistoryModel } from '../user/user-video-history' |
108 | import { buildTrigramSearchIndex, buildWhereIdOrUUID, getVideoSort, isOutdated, throwIfNotValid } from '../utils' | 108 | import { buildTrigramSearchIndex, buildWhereIdOrUUID, getVideoSort, isOutdated, throwIfNotValid } from '../utils' |
109 | import { VideoViewModel } from '../view/video-view' | ||
109 | import { | 110 | import { |
110 | videoFilesModelToFormattedJSON, | 111 | videoFilesModelToFormattedJSON, |
111 | VideoFormattingJSONOptions, | 112 | VideoFormattingJSONOptions, |
@@ -135,7 +136,6 @@ import { VideoPlaylistElementModel } from './video-playlist-element' | |||
135 | import { VideoShareModel } from './video-share' | 136 | import { VideoShareModel } from './video-share' |
136 | import { VideoStreamingPlaylistModel } from './video-streaming-playlist' | 137 | import { VideoStreamingPlaylistModel } from './video-streaming-playlist' |
137 | import { VideoTagModel } from './video-tag' | 138 | import { VideoTagModel } from './video-tag' |
138 | import { VideoViewModel } from './video-view' | ||
139 | 139 | ||
140 | export enum ScopeNames { | 140 | export enum ScopeNames { |
141 | FOR_API = 'FOR_API', | 141 | FOR_API = 'FOR_API', |