From 40298b02546e8225dd21bf6048fe7f224aefc32a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 2 Oct 2017 12:20:26 +0200 Subject: Implement video transcoding on server side --- server/tests/utils/videos.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'server/tests/utils') diff --git a/server/tests/utils/videos.ts b/server/tests/utils/videos.ts index 0de506cd9..7f8bd39c0 100644 --- a/server/tests/utils/videos.ts +++ b/server/tests/utils/videos.ts @@ -238,9 +238,10 @@ function rateVideo (url: string, accessToken: string, id: number, rating: string .expect(specialStatus) } -function parseTorrentVideo (server: ServerInfo, videoUUID: string) { +function parseTorrentVideo (server: ServerInfo, videoUUID: string, resolutionLabel: string) { return new Promise((res, rej) => { - const torrentPath = join(__dirname, '..', '..', '..', 'test' + server.serverNumber, 'torrents', videoUUID + '.torrent') + const torrentName = videoUUID + '-' + resolutionLabel + '.torrent' + const torrentPath = join(__dirname, '..', '..', '..', 'test' + server.serverNumber, 'torrents', torrentName) readFile(torrentPath, (err, data) => { if (err) return rej(err) -- cgit v1.2.3