import { VideoDetails, VideoPrivacy } from '../../models/videos'
import { VIDEO_CATEGORIES, VIDEO_LANGUAGES, loadLanguages, VIDEO_LICENCES, VIDEO_PRIVACIES } from '../../../server/initializers/constants'
import { dateIsValid, webtorrentAdd, buildServerDirectory } from '../miscs/miscs'
import { VideoDetails, VideoPrivacy } from '../../models/videos'
import { VIDEO_CATEGORIES, VIDEO_LANGUAGES, loadLanguages, VIDEO_LICENCES, VIDEO_PRIVACIES } from '../../../server/initializers/constants'
import { dateIsValid, webtorrentAdd, buildServerDirectory } from '../miscs/miscs'
-function getMyVideos (url: string, accessToken: string, start: number, count: number, sort?: string) {
+function getMyVideos (url: string, accessToken: string, start: number, count: number, sort?: string, search?: string) {
-function getVideosListPagination (url: string, start: number, count: number, sort?: string) {
+function getVideosListPagination (url: string, start: number, count: number, sort?: string, skipCount?: boolean) {
// Transcoding enabled: extension will always be .mp4
if (attributes.files.length > 1) extension = '.mp4'
// Transcoding enabled: extension will always be .mp4
if (attributes.files.length > 1) extension = '.mp4'
expect(file.magnetUri).to.have.lengthOf.above(2)
expect(file.torrentUrl).to.equal(`http://${attributes.account.host}/static/torrents/${videoDetails.uuid}-${file.resolution.id}.torrent`)
expect(file.fileUrl).to.equal(`http://${attributes.account.host}/static/webseed/${videoDetails.uuid}-${file.resolution.id}${extension}`)
expect(file.magnetUri).to.have.lengthOf.above(2)
expect(file.torrentUrl).to.equal(`http://${attributes.account.host}/static/torrents/${videoDetails.uuid}-${file.resolution.id}.torrent`)
expect(file.fileUrl).to.equal(`http://${attributes.account.host}/static/webseed/${videoDetails.uuid}-${file.resolution.id}${extension}`)
'File size for resolution ' + file.resolution.label + ' outside confidence interval (' + minSize + '> size <' + maxSize + ')')
.to.be.above(minSize).and.below(maxSize)
'File size for resolution ' + file.resolution.label + ' outside confidence interval (' + minSize + '> size <' + maxSize + ')')
.to.be.above(minSize).and.below(maxSize)
- {
- await testImage(url, attributes.thumbnailfile || attributes.fixture, videoDetails.thumbnailPath)
- }
-
- if (attributes.previewfile) {
- await testImage(url, attributes.previewfile, videoDetails.previewPath)
- }
-
- const torrent = await webtorrentAdd(magnetUri, true)
+ const torrent = await webtorrentAdd(file.magnetUri, true)
expect(torrent.files).to.be.an('array')
expect(torrent.files.length).to.equal(1)
expect(torrent.files[0].path).to.exist.and.to.not.equal('')
}
expect(torrent.files).to.be.an('array')
expect(torrent.files.length).to.equal(1)
expect(torrent.files[0].path).to.exist.and.to.not.equal('')
}
+
+ await testImage(url, attributes.thumbnailfile || attributes.fixture, videoDetails.thumbnailPath)
+
+ if (attributes.previewfile) {
+ await testImage(url, attributes.previewfile, videoDetails.previewPath)
+ }