diff options
Diffstat (limited to 'shared/extra-utils/videos/videos.ts')
-rw-r--r-- | shared/extra-utils/videos/videos.ts | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/shared/extra-utils/videos/videos.ts b/shared/extra-utils/videos/videos.ts index 2f7f2182c..29a646541 100644 --- a/shared/extra-utils/videos/videos.ts +++ b/shared/extra-utils/videos/videos.ts | |||
@@ -312,6 +312,14 @@ function removeVideo (url: string, token: string, id: number | string, expectedS | |||
312 | .expect(expectedStatus) | 312 | .expect(expectedStatus) |
313 | } | 313 | } |
314 | 314 | ||
315 | async function removeAllVideos (server: ServerInfo) { | ||
316 | const resVideos = await getVideosList(server.url) | ||
317 | |||
318 | for (const v of resVideos.body.data) { | ||
319 | await removeVideo(server.url, server.accessToken, v.id) | ||
320 | } | ||
321 | } | ||
322 | |||
315 | async function checkVideoFilesWereRemoved ( | 323 | async function checkVideoFilesWereRemoved ( |
316 | videoUUID: string, | 324 | videoUUID: string, |
317 | serverNumber: number, | 325 | serverNumber: number, |
@@ -685,6 +693,7 @@ export { | |||
685 | getVideoFileMetadataUrl, | 693 | getVideoFileMetadataUrl, |
686 | getVideoWithToken, | 694 | getVideoWithToken, |
687 | getVideosList, | 695 | getVideosList, |
696 | removeAllVideos, | ||
688 | getVideosListPagination, | 697 | getVideosListPagination, |
689 | getVideosListSort, | 698 | getVideosListSort, |
690 | removeVideo, | 699 | removeVideo, |