diff options
Diffstat (limited to 'server/controllers')
-rw-r--r-- | server/controllers/api/remote.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/server/controllers/api/remote.js b/server/controllers/api/remote.js index 2d0db51c0..35f386ba6 100644 --- a/server/controllers/api/remote.js +++ b/server/controllers/api/remote.js | |||
@@ -38,7 +38,7 @@ function remoteVideos (req, res, next) { | |||
38 | const videoData = request.data | 38 | const videoData = request.data |
39 | 39 | ||
40 | if (request.type === 'add') { | 40 | if (request.type === 'add') { |
41 | addRemoteVideo(videoData, callbackEach) | 41 | addRemoteVideo(videoData, fromHost, callbackEach) |
42 | } else if (request.type === 'remove') { | 42 | } else if (request.type === 'remove') { |
43 | removeRemoteVideo(videoData, fromHost, callbackEach) | 43 | removeRemoteVideo(videoData, fromHost, callbackEach) |
44 | } else { | 44 | } else { |
@@ -52,10 +52,11 @@ function remoteVideos (req, res, next) { | |||
52 | return res.type('json').status(204).end() | 52 | return res.type('json').status(204).end() |
53 | } | 53 | } |
54 | 54 | ||
55 | function addRemoteVideo (videoToCreateData, callback) { | 55 | function addRemoteVideo (videoToCreateData, fromHost, callback) { |
56 | logger.debug('Adding remote video "%s".', videoToCreateData.name) | 56 | logger.debug('Adding remote video "%s".', videoToCreateData.name) |
57 | 57 | ||
58 | const video = new Video(videoToCreateData) | 58 | const video = new Video(videoToCreateData) |
59 | video.podHost = fromHost | ||
59 | Video.generateThumbnailFromBase64(video, videoToCreateData.thumbnailBase64, function (err) { | 60 | Video.generateThumbnailFromBase64(video, videoToCreateData.thumbnailBase64, function (err) { |
60 | if (err) { | 61 | if (err) { |
61 | logger.error('Cannot generate thumbnail from base 64 data.', { error: err }) | 62 | logger.error('Cannot generate thumbnail from base 64 data.', { error: err }) |