X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fmodels%2Fvideo%2Fvideo.ts;h=a3e3b6cfe4c8e96a1337d4f6ac600d1dce637c11;hb=de6310b2fcbb8a6b79c546b23dfa1920724faaa7;hp=334d768c9bd08b9d1859b74d491b133034416aa5;hpb=de97d62109c5ab668982908a8060d1c07150216e;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/models/video/video.ts b/server/models/video/video.ts index 334d768c9..a3e3b6cfe 100644 --- a/server/models/video/video.ts +++ b/server/models/video/video.ts @@ -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' @@ -95,7 +95,7 @@ import { MVideoWithRights } from '../../types/models' import { MThumbnail } from '../../types/models/video/thumbnail' -import { MVideoFile, MVideoFileStreamingPlaylistVideo, MVideoFileRedundanciesOpt } from '../../types/models/video/video-file' +import { MVideoFile, MVideoFileRedundanciesOpt, MVideoFileStreamingPlaylistVideo } from '../../types/models/video/video-file' import { VideoAbuseModel } from '../abuse/video-abuse' import { AccountModel } from '../account/account' import { AccountVideoRateModel } from '../account/account-video-rate' @@ -127,7 +127,6 @@ import { VideoShareModel } from './video-share' import { VideoStreamingPlaylistModel } from './video-streaming-playlist' import { VideoTagModel } from './video-tag' import { VideoViewModel } from './video-view' -import { stream } from 'winston' export enum ScopeNames { AVAILABLE_FOR_LIST_IDS = 'AVAILABLE_FOR_LIST_IDS', @@ -550,6 +549,11 @@ export class VideoModel extends Model { @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)) @@ -1479,7 +1483,6 @@ export class VideoModel extends Model { const thumbnailsDone = new Set() const historyDone = new Set() const videoFilesDone = new Set() - const videoStreamingPlaylistsDone = new Set() const videos: VideoModel[] = [] @@ -1760,7 +1763,7 @@ export class VideoModel extends Model { return videoFilesModelToFormattedJSON(this, baseUrlHttp, baseUrlWs, files) } - toActivityPubObject (this: MVideoAP): VideoTorrentObject { + toActivityPubObject (this: MVideoAP): VideoObject { return videoModelToActivityPubObject(this) }