X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=shared%2Fextra-utils%2Fvideos%2Fvideos.ts;h=0d36a38a24a59d9240a531a4bd79bf6f035b8a37;hb=8319d6ae72d4da6de51bd3d4b5c68040fc8dc3b4;hp=39a06b0d7b304a8f125b0c29a7569c39cd632963;hpb=2ad9dcda240ee843c5e4a5b98cc94f7b2aab2c89;p=github%2FChocobozzz%2FPeerTube.git 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) { .expect(expectedStatus) } +function getVideoFileMetadataUrl (url: string) { + return request(url) + .get('/') + .set('Accept', 'application/json') + .expect(200) + .expect('Content-Type', /json/) +} + function viewVideo (url: string, id: number | string, expectedStatus = 204, xForwardedFor?: string) { const path = '/api/v1/videos/' + id + '/views' @@ -643,6 +651,7 @@ export { getAccountVideos, getVideoChannelVideos, getVideo, + getVideoFileMetadataUrl, getVideoWithToken, getVideosList, getVideosListPagination,