Skip to content

Commit

Permalink
feat: use relative path in mediainfo info (#657)
Browse files Browse the repository at this point in the history
  • Loading branch information
trim21 authored Nov 29, 2023
1 parent a4dd536 commit 572ce1e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/routes/api/torrents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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});
Expand Down

0 comments on commit 572ce1e

Please sign in to comment.