downloadEnabled?: boolean
waitTranscoding?: boolean
description?: string
+ originallyPublishedAt?: string
tags?: string[]
channelId?: number
privacy?: VideoPrivacy
})
}
+function getPlaylistVideos (
+ url: string,
+ accessToken: string,
+ playlistId: number | string,
+ start: number,
+ count: number,
+ query: { nsfw?: boolean } = {}
+) {
+ const path = '/api/v1/video-playlists/' + playlistId + '/videos'
+
+ return makeGetRequest({
+ url,
+ path,
+ query: immutableAssign(query, {
+ start,
+ count
+ }),
+ token: accessToken,
+ statusCodeExpected: 200
+ })
+}
+
function getVideosListPagination (url: string, start: number, count: number, sort?: string) {
const path = '/api/v1/videos'
}
}
+ if (attributes.originallyPublishedAt !== undefined) {
+ req.field('originallyPublishedAt', attributes.originallyPublishedAt)
+ }
+
return req.attach('videofile', buildAbsoluteFixturePath(attributes.fixture))
.expect(specialStatus)
}
if (attributes.nsfw !== undefined) body['nsfw'] = JSON.stringify(attributes.nsfw)
if (attributes.commentsEnabled !== undefined) body['commentsEnabled'] = JSON.stringify(attributes.commentsEnabled)
if (attributes.downloadEnabled !== undefined) body['downloadEnabled'] = JSON.stringify(attributes.downloadEnabled)
+ if (attributes.originallyPublishedAt !== undefined) body['originallyPublishedAt'] = attributes.originallyPublishedAt
if (attributes.description) body['description'] = attributes.description
if (attributes.tags) body['tags'] = attributes.tags
if (attributes.privacy) body['privacy'] = attributes.privacy
description: string
publishedAt?: string
support: string
+ originallyPublishedAt?: string,
account: {
name: string
host: string
expect(video.publishedAt).to.equal(attributes.publishedAt)
}
+ if (attributes.originallyPublishedAt) {
+ expect(video.originallyPublishedAt).to.equal(attributes.originallyPublishedAt)
+ } else {
+ expect(video.originallyPublishedAt).to.be.null
+ }
+
const res = await getVideo(url, video.uuid)
const videoDetails: VideoDetails = res.body
parseTorrentVideo,
getLocalVideos,
completeVideoCheck,
- checkVideoFilesWereRemoved
+ checkVideoFilesWereRemoved,
+ getPlaylistVideos
}