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.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/helpers/webtorrent.ts b/server/helpers/webtorrent.ts
index 83b46e085..5e1ea6198 100644
--- a/server/helpers/webtorrent.ts
+++ b/server/helpers/webtorrent.ts
@@ -21,8 +21,8 @@ import { extractVideo } from './video'
21 21
22const createTorrentPromise = promisify2<string, any, any>(createTorrent) 22const createTorrentPromise = promisify2<string, any, any>(createTorrent)
23 23
24async function downloadWebTorrentVideo (target: { magnetUri: string, torrentName?: string }, timeout: number) { 24async function downloadWebTorrentVideo (target: { uri: string, torrentName?: string }, timeout: number) {
25 const id = target.magnetUri || target.torrentName 25 const id = target.uri || target.torrentName
26 let timer 26 let timer
27 27
28 const path = generateVideoImportTmpPath(id) 28 const path = generateVideoImportTmpPath(id)
@@ -35,7 +35,7 @@ async function downloadWebTorrentVideo (target: { magnetUri: string, torrentName
35 const webtorrent = new WebTorrent() 35 const webtorrent = new WebTorrent()
36 let file: TorrentFile 36 let file: TorrentFile
37 37
38 const torrentId = target.magnetUri || join(CONFIG.STORAGE.TORRENTS_DIR, target.torrentName) 38 const torrentId = target.uri || join(CONFIG.STORAGE.TORRENTS_DIR, target.torrentName)
39 39
40 const options = { path: directoryPath } 40 const options = { path: directoryPath }
41 const torrent = webtorrent.add(torrentId, options, torrent => { 41 const torrent = webtorrent.add(torrentId, options, torrent => {