diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-02-07 10:39:37 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-02-07 10:39:37 +0100 |
commit | b3077e417056f18225957f65419b87de72117fe3 (patch) | |
tree | be00437c83175ca09b184df6fb21ffe149e11ff8 /lib | |
parent | c5a8be2b6282d2042e469e1b7c1e7ce8795c026f (diff) | |
download | PeerTube-b3077e417056f18225957f65419b87de72117fe3.tar.gz PeerTube-b3077e417056f18225957f65419b87de72117fe3.tar.zst PeerTube-b3077e417056f18225957f65419b87de72117fe3.zip |
Standard v6
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 | }) |