diff options
Diffstat (limited to 'server/models/video/video-format-utils.ts')
-rw-r--r-- | server/models/video/video-format-utils.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/models/video/video-format-utils.ts b/server/models/video/video-format-utils.ts index 4e7eb5f0c..6aa7c1e3e 100644 --- a/server/models/video/video-format-utils.ts +++ b/server/models/video/video-format-utils.ts | |||
@@ -16,7 +16,7 @@ import { | |||
16 | } from '../../lib/activitypub' | 16 | } from '../../lib/activitypub' |
17 | import { isArray } from '../../helpers/custom-validators/misc' | 17 | import { isArray } from '../../helpers/custom-validators/misc' |
18 | import { VideoStreamingPlaylist } from '../../../shared/models/videos/video-streaming-playlist.model' | 18 | import { VideoStreamingPlaylist } from '../../../shared/models/videos/video-streaming-playlist.model' |
19 | import { MVideo, MVideoAP, MVideoDetails } from '../../typings/models' | 19 | import { MVideo, MVideoAP, MVideoFormattable, MVideoFormattableDetails } from '../../typings/models' |
20 | import { MStreamingPlaylistRedundancies } from '../../typings/models/video/video-streaming-playlist' | 20 | import { MStreamingPlaylistRedundancies } from '../../typings/models/video/video-streaming-playlist' |
21 | import { MVideoFileRedundanciesOpt } from '../../typings/models/video/video-file' | 21 | import { MVideoFileRedundanciesOpt } from '../../typings/models/video/video-file' |
22 | 22 | ||
@@ -29,7 +29,7 @@ export type VideoFormattingJSONOptions = { | |||
29 | blacklistInfo?: boolean | 29 | blacklistInfo?: boolean |
30 | } | 30 | } |
31 | } | 31 | } |
32 | function videoModelToFormattedJSON (video: VideoModel, options?: VideoFormattingJSONOptions): Video { | 32 | function videoModelToFormattedJSON (video: MVideoFormattable, options?: VideoFormattingJSONOptions): Video { |
33 | const userHistory = isArray(video.UserVideoHistories) ? video.UserVideoHistories[0] : undefined | 33 | const userHistory = isArray(video.UserVideoHistories) ? video.UserVideoHistories[0] : undefined |
34 | 34 | ||
35 | const videoObject: Video = { | 35 | const videoObject: Video = { |
@@ -103,7 +103,7 @@ function videoModelToFormattedJSON (video: VideoModel, options?: VideoFormatting | |||
103 | return videoObject | 103 | return videoObject |
104 | } | 104 | } |
105 | 105 | ||
106 | function videoModelToFormattedDetailsJSON (video: MVideoDetails): VideoDetails { | 106 | function videoModelToFormattedDetailsJSON (video: MVideoFormattableDetails): VideoDetails { |
107 | const formattedJson = video.toFormattedJSON({ | 107 | const formattedJson = video.toFormattedJSON({ |
108 | additionalAttributes: { | 108 | additionalAttributes: { |
109 | scheduledUpdate: true, | 109 | scheduledUpdate: true, |