diff options
Diffstat (limited to 'server/lib/webtorrentProcess.js')
-rw-r--r-- | server/lib/webtorrentProcess.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/server/lib/webtorrentProcess.js b/server/lib/webtorrentProcess.js index 7889e7128..be7ac5bb4 100644 --- a/server/lib/webtorrentProcess.js +++ b/server/lib/webtorrentProcess.js | |||
@@ -26,11 +26,11 @@ function webtorrent (args) { | |||
26 | const _id = data._id | 26 | const _id = data._id |
27 | 27 | ||
28 | wt.seed(path, { announceList: '' }, function (torrent) { | 28 | wt.seed(path, { announceList: '' }, function (torrent) { |
29 | const to_send = { | 29 | const toSend = { |
30 | magnetUri: torrent.magnetURI | 30 | magnetUri: torrent.magnetURI |
31 | } | 31 | } |
32 | 32 | ||
33 | ipc.of[nodeKey].emit(nodeKey + '.seedDone.' + _id, to_send) | 33 | ipc.of[nodeKey].emit(nodeKey + '.seedDone.' + _id, toSend) |
34 | }) | 34 | }) |
35 | } | 35 | } |
36 | 36 | ||
@@ -40,15 +40,15 @@ function webtorrent (args) { | |||
40 | const _id = data._id | 40 | const _id = data._id |
41 | 41 | ||
42 | wt.add(magnetUri, function (torrent) { | 42 | wt.add(magnetUri, function (torrent) { |
43 | const to_send = { | 43 | const toSend = { |
44 | files: [] | 44 | files: [] |
45 | } | 45 | } |
46 | 46 | ||
47 | torrent.files.forEach(function (file) { | 47 | torrent.files.forEach(function (file) { |
48 | to_send.files.push({ path: file.path }) | 48 | toSend.files.push({ path: file.path }) |
49 | }) | 49 | }) |
50 | 50 | ||
51 | ipc.of[nodeKey].emit(nodeKey + '.addDone.' + _id, to_send) | 51 | ipc.of[nodeKey].emit(nodeKey + '.addDone.' + _id, toSend) |
52 | }) | 52 | }) |
53 | } | 53 | } |
54 | 54 | ||
@@ -65,8 +65,8 @@ function webtorrent (args) { | |||
65 | } | 65 | } |
66 | 66 | ||
67 | function callback () { | 67 | function callback () { |
68 | const to_send = {} | 68 | const toSend = {} |
69 | ipc.of[nodeKey].emit(nodeKey + '.removeDone.' + _id, to_send) | 69 | ipc.of[nodeKey].emit(nodeKey + '.removeDone.' + _id, toSend) |
70 | } | 70 | } |
71 | } | 71 | } |
72 | 72 | ||