diff options
Diffstat (limited to 'server/helpers/webtorrent.ts')
-rw-r--r-- | server/helpers/webtorrent.ts | 4 |
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 @@ | |||
1 | import { decode, encode } from 'bencode' | 1 | import { decode, encode } from 'bencode' |
2 | import createTorrent from 'create-torrent' | 2 | import createTorrent from 'create-torrent' |
3 | import { createWriteStream, ensureDir, pathExists, readFile, remove, writeFile } from 'fs-extra' | 3 | import { createWriteStream, ensureDir, pathExists, readFile, remove, writeFile } from 'fs-extra' |
4 | import magnetUtil from 'magnet-uri' | 4 | import { encode as magnetUriEncode } from 'magnet-uri' |
5 | import parseTorrent from 'parse-torrent' | 5 | import parseTorrent from 'parse-torrent' |
6 | import { dirname, join } from 'path' | 6 | import { dirname, join } from 'path' |
7 | import { pipeline } from 'stream' | 7 | import { 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 | // --------------------------------------------------------------------------- |