aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared
diff options
context:
space:
mode:
Diffstat (limited to 'shared')
-rw-r--r--shared/extra-utils/server/jobs.ts4
-rw-r--r--shared/models/activitypub/activity.ts4
-rw-r--r--shared/models/server/job.model.ts2
-rw-r--r--shared/models/videos/live/live-video-event-payload.model.ts4
-rw-r--r--shared/models/videos/video.model.ts3
5 files changed, 12 insertions, 5 deletions
diff --git a/shared/extra-utils/server/jobs.ts b/shared/extra-utils/server/jobs.ts
index 79b8c3183..afaaa5cd6 100644
--- a/shared/extra-utils/server/jobs.ts
+++ b/shared/extra-utils/server/jobs.ts
@@ -1,5 +1,5 @@
1 1
2import { JobState } from '../../models' 2import { JobState, JobType } from '../../models'
3import { wait } from '../miscs' 3import { wait } from '../miscs'
4import { PeerTubeServer } from './server' 4import { PeerTubeServer } from './server'
5 5
@@ -16,7 +16,7 @@ async function waitJobs (serversArg: PeerTubeServer[] | PeerTubeServer, skipDela
16 const states: JobState[] = [ 'waiting', 'active' ] 16 const states: JobState[] = [ 'waiting', 'active' ]
17 if (!skipDelayed) states.push('delayed') 17 if (!skipDelayed) states.push('delayed')
18 18
19 const repeatableJobs = [ 'videos-views', 'activitypub-cleaner' ] 19 const repeatableJobs: JobType[] = [ 'videos-views-stats', 'activitypub-cleaner' ]
20 let pendingRequests: boolean 20 let pendingRequests: boolean
21 21
22 function tasksBuilder () { 22 function tasksBuilder () {
diff --git a/shared/models/activitypub/activity.ts b/shared/models/activitypub/activity.ts
index 548d8858e..d6284e283 100644
--- a/shared/models/activitypub/activity.ts
+++ b/shared/models/activitypub/activity.ts
@@ -6,7 +6,6 @@ import { DislikeObject } from './objects/dislike-object'
6import { APObject } from './objects/object.model' 6import { APObject } from './objects/object.model'
7import { PlaylistObject } from './objects/playlist-object' 7import { PlaylistObject } from './objects/playlist-object'
8import { VideoCommentObject } from './objects/video-comment-object' 8import { VideoCommentObject } from './objects/video-comment-object'
9import { ViewObject } from './objects/view-object'
10 9
11export type Activity = 10export type Activity =
12 ActivityCreate | 11 ActivityCreate |
@@ -53,7 +52,7 @@ export interface BaseActivity {
53 52
54export interface ActivityCreate extends BaseActivity { 53export interface ActivityCreate extends BaseActivity {
55 type: 'Create' 54 type: 'Create'
56 object: VideoObject | AbuseObject | ViewObject | DislikeObject | VideoCommentObject | CacheFileObject | PlaylistObject 55 object: VideoObject | AbuseObject | DislikeObject | VideoCommentObject | CacheFileObject | PlaylistObject
57} 56}
58 57
59export interface ActivityUpdate extends BaseActivity { 58export interface ActivityUpdate extends BaseActivity {
@@ -100,6 +99,7 @@ export interface ActivityView extends BaseActivity {
100 type: 'View' 99 type: 'View'
101 actor: string 100 actor: string
102 object: APObject 101 object: APObject
102 expires: string
103} 103}
104 104
105export interface ActivityDislike extends BaseActivity { 105export interface ActivityDislike extends BaseActivity {
diff --git a/shared/models/server/job.model.ts b/shared/models/server/job.model.ts
index 12e0fcf85..6da2753b3 100644
--- a/shared/models/server/job.model.ts
+++ b/shared/models/server/job.model.ts
@@ -14,7 +14,7 @@ export type JobType =
14 | 'video-transcoding' 14 | 'video-transcoding'
15 | 'email' 15 | 'email'
16 | 'video-import' 16 | 'video-import'
17 | 'videos-views' 17 | 'videos-views-stats'
18 | 'activitypub-refresher' 18 | 'activitypub-refresher'
19 | 'video-redundancy' 19 | 'video-redundancy'
20 | 'video-live-ending' 20 | 'video-live-ending'
diff --git a/shared/models/videos/live/live-video-event-payload.model.ts b/shared/models/videos/live/live-video-event-payload.model.ts
index 6cd7540e8..1a9ac512c 100644
--- a/shared/models/videos/live/live-video-event-payload.model.ts
+++ b/shared/models/videos/live/live-video-event-payload.model.ts
@@ -2,5 +2,9 @@ import { VideoState } from '../video-state.enum'
2 2
3export interface LiveVideoEventPayload { 3export interface LiveVideoEventPayload {
4 state?: VideoState 4 state?: VideoState
5
6 // FIXME: deprecated in 4.0 in favour of viewers
5 views?: number 7 views?: number
8
9 viewers?: number
6} 10}
diff --git a/shared/models/videos/video.model.ts b/shared/models/videos/video.model.ts
index 26cb595e7..8d223cded 100644
--- a/shared/models/videos/video.model.ts
+++ b/shared/models/videos/video.model.ts
@@ -39,6 +39,9 @@ export interface Video {
39 url: string 39 url: string
40 40
41 views: number 41 views: number
42 // If live
43 viewers?: number
44
42 likes: number 45 likes: number
43 dislikes: number 46 dislikes: number
44 nsfw: boolean 47 nsfw: boolean