feat: use relative path in mediainfo info (#657)

This commit is contained in:
Trim21
2023-11-29 15:28:49 +08:00
committed by GitHub
parent a4dd536442
commit 572ce1ed3a
+2 -2
View File
@@ -905,8 +905,8 @@ router.get<{hash: string}>(
const mediainfoProcess = childProcess.execFile(
'mediainfo',
torrentContentPaths,
{maxBuffer: 1024 * 2000, timeout: 1000 * 10},
torrentContentPaths.map((x) => path.relative(torrentDirectory, x)),
{maxBuffer: 1024 * 2000, timeout: 1000 * 10, cwd: torrentDirectory},
(error, stdout) => {
if (error) {
return res.status(500).json({code: error.code, message: error.message});