Fix webtorrent crash

See https://github.com/Chocobozzz/PeerTube/issues/6109
This commit is contained in:
Chocobozzz
2023-12-15 10:18:20 +01:00
parent ea685879bb
commit 675f219639
2 changed files with 5 additions and 1 deletions

View File

@@ -36,7 +36,10 @@ async function downloadWebTorrentVideo (target: { uri: string, torrentName?: str
await ensureDir(directoryPath)
// eslint-disable-next-line new-cap
const webtorrent = new (await import('webtorrent')).default()
const webtorrent = new (await import('webtorrent')).default({
natUpnp: false,
natPmp: false
} as any)
return new Promise<string>((res, rej) => {
let file: TorrentFile