aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/extra-utils/videos/videos.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-07-16 09:04:35 +0200
committerChocobozzz <me@florianbigard.com>2021-07-20 15:27:18 +0200
commit89d241a79c262b9775c233b73cff080043ebb5e6 (patch)
treecb3b6cb431d25d891ef4e02f66c61d252d17048f /shared/extra-utils/videos/videos.ts
parentd23dd9fbfc4d26026352c10f81d2795ceaf2908a (diff)
downloadPeerTube-89d241a79c262b9775c233b73cff080043ebb5e6.tar.gz
PeerTube-89d241a79c262b9775c233b73cff080043ebb5e6.tar.zst
PeerTube-89d241a79c262b9775c233b73cff080043ebb5e6.zip
Shorter server command names
Diffstat (limited to 'shared/extra-utils/videos/videos.ts')
-rw-r--r--shared/extra-utils/videos/videos.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/shared/extra-utils/videos/videos.ts b/shared/extra-utils/videos/videos.ts
index 19f0df8b8..86f49384d 100644
--- a/shared/extra-utils/videos/videos.ts
+++ b/shared/extra-utils/videos/videos.ts
@@ -27,7 +27,7 @@ async function checkVideoFilesWereRemoved (
27 ] 27 ]
28) { 28) {
29 for (const directory of directories) { 29 for (const directory of directories) {
30 const directoryPath = server.serversCommand.buildDirectory(directory) 30 const directoryPath = server.servers.buildDirectory(directory)
31 31
32 const directoryExists = await pathExists(directoryPath) 32 const directoryExists = await pathExists(directoryPath)
33 if (directoryExists === false) continue 33 if (directoryExists === false) continue
@@ -47,8 +47,8 @@ function checkUploadVideoParam (
47 mode: 'legacy' | 'resumable' = 'legacy' 47 mode: 'legacy' | 'resumable' = 'legacy'
48) { 48) {
49 return mode === 'legacy' 49 return mode === 'legacy'
50 ? server.videosCommand.buildLegacyUpload({ token, attributes, expectedStatus }) 50 ? server.videos.buildLegacyUpload({ token, attributes, expectedStatus })
51 : server.videosCommand.buildResumeUpload({ token, attributes, expectedStatus }) 51 : server.videos.buildResumeUpload({ token, attributes, expectedStatus })
52} 52}
53 53
54async function completeVideoCheck ( 54async function completeVideoCheck (
@@ -131,7 +131,7 @@ async function completeVideoCheck (
131 expect(video.originallyPublishedAt).to.be.null 131 expect(video.originallyPublishedAt).to.be.null
132 } 132 }
133 133
134 const videoDetails = await server.videosCommand.get({ id: video.uuid }) 134 const videoDetails = await server.videos.get({ id: video.uuid })
135 135
136 expect(videoDetails.files).to.have.lengthOf(attributes.files.length) 136 expect(videoDetails.files).to.have.lengthOf(attributes.files.length)
137 expect(videoDetails.tags).to.deep.equal(attributes.tags) 137 expect(videoDetails.tags).to.deep.equal(attributes.tags)
@@ -202,7 +202,7 @@ async function uploadRandomVideoOnServers (
202 additionalParams?: VideoEdit & { prefixName?: string } 202 additionalParams?: VideoEdit & { prefixName?: string }
203) { 203) {
204 const server = servers.find(s => s.serverNumber === serverNumber) 204 const server = servers.find(s => s.serverNumber === serverNumber)
205 const res = await server.videosCommand.randomUpload({ wait: false, ...additionalParams }) 205 const res = await server.videos.randomUpload({ wait: false, ...additionalParams })
206 206
207 await waitJobs(servers) 207 await waitJobs(servers)
208 208