aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/extra-utils/videos/videos.ts
diff options
context:
space:
mode:
Diffstat (limited to 'shared/extra-utils/videos/videos.ts')
-rw-r--r--shared/extra-utils/videos/videos.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/shared/extra-utils/videos/videos.ts b/shared/extra-utils/videos/videos.ts
index a3a276188..469ea4d63 100644
--- a/shared/extra-utils/videos/videos.ts
+++ b/shared/extra-utils/videos/videos.ts
@@ -6,9 +6,9 @@ import got, { Response as GotResponse } from 'got/dist/source'
6import * as parseTorrent from 'parse-torrent' 6import * as parseTorrent from 'parse-torrent'
7import { join } from 'path' 7import { join } from 'path'
8import * as request from 'supertest' 8import * as request from 'supertest'
9import { v4 as uuidv4 } from 'uuid'
10import validator from 'validator' 9import validator from 'validator'
11import { getLowercaseExtension } from '@server/helpers/core-utils' 10import { getLowercaseExtension } from '@server/helpers/core-utils'
11import { buildUUID } from '@server/helpers/uuid'
12import { HttpStatusCode } from '@shared/core-utils' 12import { HttpStatusCode } from '@shared/core-utils'
13import { VideosCommonQuery } from '@shared/models' 13import { VideosCommonQuery } from '@shared/models'
14import { loadLanguages, VIDEO_CATEGORIES, VIDEO_LANGUAGES, VIDEO_LICENCES, VIDEO_PRIVACIES } from '../../../server/initializers/constants' 14import { loadLanguages, VIDEO_CATEGORIES, VIDEO_LANGUAGES, VIDEO_LICENCES, VIDEO_PRIVACIES } from '../../../server/initializers/constants'
@@ -806,7 +806,7 @@ async function uploadVideoAndGetId (options: {
806 806
807 const res = await uploadVideo(options.server.url, options.token || options.server.accessToken, videoAttrs) 807 const res = await uploadVideo(options.server.url, options.token || options.server.accessToken, videoAttrs)
808 808
809 return { id: res.body.video.id, uuid: res.body.video.uuid } 809 return res.body.video as { id: number, uuid: string, shortUUID: string }
810} 810}
811 811
812async function getLocalIdByUUID (url: string, uuid: string) { 812async function getLocalIdByUUID (url: string, uuid: string) {
@@ -827,7 +827,7 @@ async function uploadRandomVideoOnServers (servers: ServerInfo[], serverNumber:
827 827
828async function uploadRandomVideo (server: ServerInfo, wait = true, additionalParams: any = {}) { 828async function uploadRandomVideo (server: ServerInfo, wait = true, additionalParams: any = {}) {
829 const prefixName = additionalParams.prefixName || '' 829 const prefixName = additionalParams.prefixName || ''
830 const name = prefixName + uuidv4() 830 const name = prefixName + buildUUID()
831 831
832 const data = Object.assign({ name }, additionalParams) 832 const data = Object.assign({ name }, additionalParams)
833 const res = await uploadVideo(server.url, server.accessToken, data) 833 const res = await uploadVideo(server.url, server.accessToken, data)