]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/video/video-format-utils.ts
Fix ownership change
[github/Chocobozzz/PeerTube.git] / server / models / video / video-format-utils.ts
index 4e7eb5f0c7cbb8225ab0f92dd9ed9afcf029b5a2..6aa7c1e3ea0728c17ffee8ad4f659b727100190c 100644 (file)
@@ -16,7 +16,7 @@ import {
 } from '../../lib/activitypub'
 import { isArray } from '../../helpers/custom-validators/misc'
 import { VideoStreamingPlaylist } from '../../../shared/models/videos/video-streaming-playlist.model'
-import { MVideo, MVideoAP, MVideoDetails } from '../../typings/models'
+import { MVideo, MVideoAP, MVideoFormattable, MVideoFormattableDetails } from '../../typings/models'
 import { MStreamingPlaylistRedundancies } from '../../typings/models/video/video-streaming-playlist'
 import { MVideoFileRedundanciesOpt } from '../../typings/models/video/video-file'
 
@@ -29,7 +29,7 @@ export type VideoFormattingJSONOptions = {
     blacklistInfo?: boolean
   }
 }
-function videoModelToFormattedJSON (video: VideoModel, options?: VideoFormattingJSONOptions): Video {
+function videoModelToFormattedJSON (video: MVideoFormattable, options?: VideoFormattingJSONOptions): Video {
   const userHistory = isArray(video.UserVideoHistories) ? video.UserVideoHistories[0] : undefined
 
   const videoObject: Video = {
@@ -103,7 +103,7 @@ function videoModelToFormattedJSON (video: VideoModel, options?: VideoFormatting
   return videoObject
 }
 
-function videoModelToFormattedDetailsJSON (video: MVideoDetails): VideoDetails {
+function videoModelToFormattedDetailsJSON (video: MVideoFormattableDetails): VideoDetails {
   const formattedJson = video.toFormattedJSON({
     additionalAttributes: {
       scheduledUpdate: true,