diff options
author | Chocobozzz <me@florianbigard.com> | 2021-07-16 09:47:51 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-07-20 15:27:18 +0200 |
commit | 254d3579f5338f5fd775c17d15cdfc37078bcfb4 (patch) | |
tree | eaeb13fda16c16e98cd6991d202b0ca6a4cbdb63 /shared/extra-utils/videos/videos.ts | |
parent | 89d241a79c262b9775c233b73cff080043ebb5e6 (diff) | |
download | PeerTube-254d3579f5338f5fd775c17d15cdfc37078bcfb4.tar.gz PeerTube-254d3579f5338f5fd775c17d15cdfc37078bcfb4.tar.zst PeerTube-254d3579f5338f5fd775c17d15cdfc37078bcfb4.zip |
Use an object to represent a server
Diffstat (limited to 'shared/extra-utils/videos/videos.ts')
-rw-r--r-- | shared/extra-utils/videos/videos.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/shared/extra-utils/videos/videos.ts b/shared/extra-utils/videos/videos.ts index 86f49384d..b41533808 100644 --- a/shared/extra-utils/videos/videos.ts +++ b/shared/extra-utils/videos/videos.ts | |||
@@ -9,12 +9,12 @@ import { VIDEO_CATEGORIES, VIDEO_LANGUAGES, VIDEO_LICENCES, VIDEO_PRIVACIES } fr | |||
9 | import { dateIsValid, testImage, webtorrentAdd } from '../miscs' | 9 | import { dateIsValid, testImage, webtorrentAdd } from '../miscs' |
10 | import { makeRawRequest } from '../requests/requests' | 10 | import { makeRawRequest } from '../requests/requests' |
11 | import { waitJobs } from '../server' | 11 | import { waitJobs } from '../server' |
12 | import { ServerInfo } from '../server/servers' | 12 | import { PeerTubeServer } from '../server/server' |
13 | import { VideoEdit } from './videos-command' | 13 | import { VideoEdit } from './videos-command' |
14 | 14 | ||
15 | async function checkVideoFilesWereRemoved ( | 15 | async function checkVideoFilesWereRemoved ( |
16 | videoUUID: string, | 16 | videoUUID: string, |
17 | server: ServerInfo, | 17 | server: PeerTubeServer, |
18 | directories = [ | 18 | directories = [ |
19 | 'redundancy', | 19 | 'redundancy', |
20 | 'videos', | 20 | 'videos', |
@@ -40,7 +40,7 @@ async function checkVideoFilesWereRemoved ( | |||
40 | } | 40 | } |
41 | 41 | ||
42 | function checkUploadVideoParam ( | 42 | function checkUploadVideoParam ( |
43 | server: ServerInfo, | 43 | server: PeerTubeServer, |
44 | token: string, | 44 | token: string, |
45 | attributes: Partial<VideoEdit>, | 45 | attributes: Partial<VideoEdit>, |
46 | expectedStatus = HttpStatusCode.OK_200, | 46 | expectedStatus = HttpStatusCode.OK_200, |
@@ -52,7 +52,7 @@ function checkUploadVideoParam ( | |||
52 | } | 52 | } |
53 | 53 | ||
54 | async function completeVideoCheck ( | 54 | async function completeVideoCheck ( |
55 | server: ServerInfo, | 55 | server: PeerTubeServer, |
56 | video: any, | 56 | video: any, |
57 | attributes: { | 57 | attributes: { |
58 | name: string | 58 | name: string |
@@ -197,7 +197,7 @@ async function completeVideoCheck ( | |||
197 | 197 | ||
198 | // serverNumber starts from 1 | 198 | // serverNumber starts from 1 |
199 | async function uploadRandomVideoOnServers ( | 199 | async function uploadRandomVideoOnServers ( |
200 | servers: ServerInfo[], | 200 | servers: PeerTubeServer[], |
201 | serverNumber: number, | 201 | serverNumber: number, |
202 | additionalParams?: VideoEdit & { prefixName?: string } | 202 | additionalParams?: VideoEdit & { prefixName?: string } |
203 | ) { | 203 | ) { |