aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers')
-rw-r--r--server/controllers/api/remote/videos.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/server/controllers/api/remote/videos.js b/server/controllers/api/remote/videos.js
index 98891c99e..cbd58e0e4 100644
--- a/server/controllers/api/remote/videos.js
+++ b/server/controllers/api/remote/videos.js
@@ -196,6 +196,8 @@ function quickAndDirtyUpdateVideoRetryWrapper (videoData, fromPod, finalCallback
196} 196}
197 197
198function quickAndDirtyUpdateVideo (videoData, fromPod, finalCallback) { 198function quickAndDirtyUpdateVideo (videoData, fromPod, finalCallback) {
199 let videoName
200
199 waterfall([ 201 waterfall([
200 databaseUtils.startSerializableTransaction, 202 databaseUtils.startSerializableTransaction,
201 203
@@ -208,6 +210,8 @@ function quickAndDirtyUpdateVideo (videoData, fromPod, finalCallback) {
208 function updateVideoIntoDB (t, videoInstance, callback) { 210 function updateVideoIntoDB (t, videoInstance, callback) {
209 const options = { transaction: t } 211 const options = { transaction: t }
210 212
213 videoName = videoInstance.name
214
211 if (videoData.views) { 215 if (videoData.views) {
212 videoInstance.set('views', videoData.views) 216 videoInstance.set('views', videoData.views)
213 } 217 }
@@ -233,7 +237,7 @@ function quickAndDirtyUpdateVideo (videoData, fromPod, finalCallback) {
233 return databaseUtils.rollbackTransaction(err, t, finalCallback) 237 return databaseUtils.rollbackTransaction(err, t, finalCallback)
234 } 238 }
235 239
236 logger.info('Remote video %s quick and dirty updated', videoData.name) 240 logger.info('Remote video %s quick and dirty updated', videoName)
237 return finalCallback(null) 241 return finalCallback(null)
238 }) 242 })
239} 243}