1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 19:42:24 +02:00

Do not transcode to an higher bitrate

Thanks bkil https://github.com/bkil
This commit is contained in:
Chocobozzz 2020-11-20 15:06:56 +01:00
parent da2516fde1
commit d218e7de94
No known key found for this signature in database
GPG key ID: 583A612D890159BE
5 changed files with 59 additions and 3 deletions

View file

@ -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,