mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-06 03:50:26 +02:00
Fix broken playlist api
This commit is contained in:
parent
85394ba22a
commit
bfbd912886
45 changed files with 1581 additions and 1014 deletions
|
@ -26,7 +26,6 @@ export type VideoFormattingJSONOptions = {
|
|||
waitTranscoding?: boolean,
|
||||
scheduledUpdate?: boolean,
|
||||
blacklistInfo?: boolean
|
||||
playlistInfo?: boolean
|
||||
}
|
||||
}
|
||||
function videoModelToFormattedJSON (video: VideoModel, options?: VideoFormattingJSONOptions): Video {
|
||||
|
@ -98,17 +97,6 @@ function videoModelToFormattedJSON (video: VideoModel, options?: VideoFormatting
|
|||
videoObject.blacklisted = !!video.VideoBlacklist
|
||||
videoObject.blacklistedReason = video.VideoBlacklist ? video.VideoBlacklist.reason : null
|
||||
}
|
||||
|
||||
if (options.additionalAttributes.playlistInfo === true) {
|
||||
// We filtered on a specific videoId/videoPlaylistId, that is unique
|
||||
const playlistElement = video.VideoPlaylistElements[0]
|
||||
|
||||
videoObject.playlistElement = {
|
||||
position: playlistElement.position,
|
||||
startTimestamp: playlistElement.startTimestamp,
|
||||
stopTimestamp: playlistElement.stopTimestamp
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return videoObject
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue