From d218e7de9400938ae6ac593d9ae5842e23abd4f0 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 20 Nov 2020 15:06:56 +0100 Subject: Do not transcode to an higher bitrate Thanks bkil https://github.com/bkil --- shared/extra-utils/server/servers.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'shared/extra-utils/server') diff --git a/shared/extra-utils/server/servers.ts b/shared/extra-utils/server/servers.ts index 6140cebb5..a647b0eb4 100644 --- a/shared/extra-utils/server/servers.ts +++ b/shared/extra-utils/server/servers.ts @@ -6,7 +6,7 @@ import { copy, pathExists, readdir, readFile, remove } from 'fs-extra' import { join } from 'path' import { randomInt } from '../../core-utils/miscs/miscs' import { VideoChannel } from '../../models/videos' -import { root, wait } from '../miscs/miscs' +import { getFileSize, root, wait } from '../miscs/miscs' interface ServerInfo { app: ChildProcess @@ -318,11 +318,18 @@ async function waitUntilLog (server: ServerInfo, str: string, count = 1, strictC } } +async function getServerFileSize (server: ServerInfo, subPath: string) { + const path = join(root(), 'test' + server.internalServerNumber, subPath) + + return getFileSize(path) +} + // --------------------------------------------------------------------------- export { checkDirectoryIsEmpty, checkTmpIsEmpty, + getServerFileSize, ServerInfo, parallelTests, cleanupTests, -- cgit v1.2.3