aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/extra-utils/videos
diff options
context:
space:
mode:
Diffstat (limited to 'shared/extra-utils/videos')
-rw-r--r--shared/extra-utils/videos/videos.ts9
1 files changed, 9 insertions, 0 deletions
diff --git a/shared/extra-utils/videos/videos.ts b/shared/extra-utils/videos/videos.ts
index 39a06b0d7..0d36a38a2 100644
--- a/shared/extra-utils/videos/videos.ts
+++ b/shared/extra-utils/videos/videos.ts
@@ -95,6 +95,14 @@ function getVideo (url: string, id: number | string, expectedStatus = 200) {
95 .expect(expectedStatus) 95 .expect(expectedStatus)
96} 96}
97 97
98function getVideoFileMetadataUrl (url: string) {
99 return request(url)
100 .get('/')
101 .set('Accept', 'application/json')
102 .expect(200)
103 .expect('Content-Type', /json/)
104}
105
98function viewVideo (url: string, id: number | string, expectedStatus = 204, xForwardedFor?: string) { 106function viewVideo (url: string, id: number | string, expectedStatus = 204, xForwardedFor?: string) {
99 const path = '/api/v1/videos/' + id + '/views' 107 const path = '/api/v1/videos/' + id + '/views'
100 108
@@ -643,6 +651,7 @@ export {
643 getAccountVideos, 651 getAccountVideos,
644 getVideoChannelVideos, 652 getVideoChannelVideos,
645 getVideo, 653 getVideo,
654 getVideoFileMetadataUrl,
646 getVideoWithToken, 655 getVideoWithToken,
647 getVideosList, 656 getVideosList,
648 getVideosListPagination, 657 getVideosListPagination,