diff options
Diffstat (limited to 'server/models/video/video-format-utils.ts')
-rw-r--r-- | server/models/video/video-format-utils.ts | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/server/models/video/video-format-utils.ts b/server/models/video/video-format-utils.ts index b947eb16f..284539def 100644 --- a/server/models/video/video-format-utils.ts +++ b/server/models/video/video-format-utils.ts | |||
@@ -26,7 +26,6 @@ export type VideoFormattingJSONOptions = { | |||
26 | waitTranscoding?: boolean, | 26 | waitTranscoding?: boolean, |
27 | scheduledUpdate?: boolean, | 27 | scheduledUpdate?: boolean, |
28 | blacklistInfo?: boolean | 28 | blacklistInfo?: boolean |
29 | playlistInfo?: boolean | ||
30 | } | 29 | } |
31 | } | 30 | } |
32 | function videoModelToFormattedJSON (video: VideoModel, options?: VideoFormattingJSONOptions): Video { | 31 | function videoModelToFormattedJSON (video: VideoModel, options?: VideoFormattingJSONOptions): Video { |
@@ -98,17 +97,6 @@ function videoModelToFormattedJSON (video: VideoModel, options?: VideoFormatting | |||
98 | videoObject.blacklisted = !!video.VideoBlacklist | 97 | videoObject.blacklisted = !!video.VideoBlacklist |
99 | videoObject.blacklistedReason = video.VideoBlacklist ? video.VideoBlacklist.reason : null | 98 | videoObject.blacklistedReason = video.VideoBlacklist ? video.VideoBlacklist.reason : null |
100 | } | 99 | } |
101 | |||
102 | if (options.additionalAttributes.playlistInfo === true) { | ||
103 | // We filtered on a specific videoId/videoPlaylistId, that is unique | ||
104 | const playlistElement = video.VideoPlaylistElements[0] | ||
105 | |||
106 | videoObject.playlistElement = { | ||
107 | position: playlistElement.position, | ||
108 | startTimestamp: playlistElement.startTimestamp, | ||
109 | stopTimestamp: playlistElement.stopTimestamp | ||
110 | } | ||
111 | } | ||
112 | } | 100 | } |
113 | 101 | ||
114 | return videoObject | 102 | return videoObject |