diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/poolRequests.js | 4 | ||||
-rw-r--r-- | lib/videos.js | 3 | ||||
-rw-r--r-- | lib/webtorrent.js | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/lib/poolRequests.js b/lib/poolRequests.js index 5b7d5489d..9ea41f383 100644 --- a/lib/poolRequests.js +++ b/lib/poolRequests.js | |||
@@ -41,7 +41,7 @@ | |||
41 | } | 41 | } |
42 | 42 | ||
43 | // Remove the request of the other type | 43 | // Remove the request of the other type |
44 | PoolRequests.removeById(id, function (err) { | 44 | PoolRequests.removeRequestById(id, function (err) { |
45 | if (err) { | 45 | if (err) { |
46 | logger.error('Cannot remove a pool request.', { error: err }) | 46 | logger.error('Cannot remove a pool request.', { error: err }) |
47 | return // Abort | 47 | return // Abort |
@@ -49,7 +49,7 @@ | |||
49 | }) | 49 | }) |
50 | } else { | 50 | } else { |
51 | PoolRequests.create(id, type, request, function (err) { | 51 | PoolRequests.create(id, type, request, function (err) { |
52 | logger.error('Cannot create a pool request.', { error: err }) | 52 | if (err) logger.error('Cannot create a pool request.', { error: err }) |
53 | return // Abort | 53 | return // Abort |
54 | }) | 54 | }) |
55 | } | 55 | } |
diff --git a/lib/videos.js b/lib/videos.js index 1bb6f2493..0e8143351 100644 --- a/lib/videos.js +++ b/lib/videos.js | |||
@@ -3,12 +3,13 @@ | |||
3 | 3 | ||
4 | var async = require('async') | 4 | var async = require('async') |
5 | var config = require('config') | 5 | var config = require('config') |
6 | var path = require('path') | ||
6 | var webtorrent = require('../lib/webtorrent') | 7 | var webtorrent = require('../lib/webtorrent') |
7 | 8 | ||
8 | var logger = require('../helpers/logger') | 9 | var logger = require('../helpers/logger') |
9 | var Videos = require('../models/videos') | 10 | var Videos = require('../models/videos') |
10 | 11 | ||
11 | var uploadDir = __dirname + '/../' + config.get('storage.uploads') | 12 | var uploadDir = path.join(__dirname, '..', config.get('storage.uploads')) |
12 | 13 | ||
13 | var videos = { | 14 | var videos = { |
14 | seed: seed, | 15 | seed: seed, |
diff --git a/lib/webtorrent.js b/lib/webtorrent.js index 7cd38156c..083e5b77a 100644 --- a/lib/webtorrent.js +++ b/lib/webtorrent.js | |||
@@ -59,7 +59,7 @@ | |||
59 | process.exit() | 59 | process.exit() |
60 | }) | 60 | }) |
61 | 61 | ||
62 | var webtorrent_process = spawn(__dirname + '/webtorrentProcess.js', host, port, { detached: true }) | 62 | var webtorrent_process = spawn(pathUtils.join(__dirname, 'webtorrentProcess.js'), host, port, { detached: true }) |
63 | webtorrent_process.stderr.on('data', function (data) { | 63 | webtorrent_process.stderr.on('data', function (data) { |
64 | // logger.debug('Webtorrent process stderr: ', data.toString()) | 64 | // logger.debug('Webtorrent process stderr: ', data.toString()) |
65 | }) | 65 | }) |