]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/video/video.ts
Handle live federation
[github/Chocobozzz/PeerTube.git] / server / models / video / video.ts
index 410d71cb33176e253de82b642d0d8a7b1373ccba..a3e3b6cfe4c8e96a1337d4f6ac600d1dce637c11 100644 (file)
@@ -31,7 +31,7 @@ import { getServerActor } from '@server/models/application/application'
 import { ModelCache } from '@server/models/model-cache'
 import { VideoFile } from '@shared/models/videos/video-file.model'
 import { ResultList, UserRight, VideoPrivacy, VideoState } from '../../../shared'
-import { VideoTorrentObject } from '../../../shared/models/activitypub/objects'
+import { VideoObject } from '../../../shared/models/activitypub/objects'
 import { Video, VideoDetails } from '../../../shared/models/videos'
 import { ThumbnailType } from '../../../shared/models/videos/thumbnail.type'
 import { VideoFilter } from '../../../shared/models/videos/video-query.type'
@@ -549,6 +549,11 @@ export class VideoModel extends Model<VideoModel> {
   @Column
   remote: boolean
 
+  @AllowNull(false)
+  @Default(false)
+  @Column
+  isLive: boolean
+
   @AllowNull(false)
   @Is('VideoUrl', value => throwIfNotValid(value, isActivityPubUrlValid, 'url'))
   @Column(DataType.STRING(CONSTRAINTS_FIELDS.VIDEOS.URL.max))
@@ -1758,7 +1763,7 @@ export class VideoModel extends Model<VideoModel> {
     return videoFilesModelToFormattedJSON(this, baseUrlHttp, baseUrlWs, files)
   }
 
-  toActivityPubObject (this: MVideoAP): VideoTorrentObject {
+  toActivityPubObject (this: MVideoAP): VideoObject {
     return videoModelToActivityPubObject(this)
   }