aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/webtorrent.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/helpers/webtorrent.ts')
-rw-r--r--server/helpers/webtorrent.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/helpers/webtorrent.ts b/server/helpers/webtorrent.ts
index e690e3890..f33a7bccd 100644
--- a/server/helpers/webtorrent.ts
+++ b/server/helpers/webtorrent.ts
@@ -1,7 +1,7 @@
1import { decode, encode } from 'bencode' 1import { decode, encode } from 'bencode'
2import createTorrent from 'create-torrent' 2import createTorrent from 'create-torrent'
3import { createWriteStream, ensureDir, pathExists, readFile, remove, writeFile } from 'fs-extra' 3import { createWriteStream, ensureDir, pathExists, readFile, remove, writeFile } from 'fs-extra'
4import magnetUtil from 'magnet-uri' 4import { encode as magnetUriEncode } from 'magnet-uri'
5import parseTorrent from 'parse-torrent' 5import parseTorrent from 'parse-torrent'
6import { dirname, join } from 'path' 6import { dirname, join } from 'path'
7import { pipeline } from 'stream' 7import { pipeline } from 'stream'
@@ -185,7 +185,7 @@ function generateMagnetUri (
185 name: video.name 185 name: video.name
186 } 186 }
187 187
188 return magnetUtil.encode(magnetHash) 188 return magnetUriEncode(magnetHash)
189} 189}
190 190
191// --------------------------------------------------------------------------- 191// ---------------------------------------------------------------------------