aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video.js
diff options
context:
space:
mode:
Diffstat (limited to 'server/models/video.js')
-rw-r--r--server/models/video.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/server/models/video.js b/server/models/video.js
index d1595ce51..564e362fd 100644
--- a/server/models/video.js
+++ b/server/models/video.js
@@ -12,6 +12,7 @@ const values = require('lodash/values')
12 12
13const constants = require('../initializers/constants') 13const constants = require('../initializers/constants')
14const logger = require('../helpers/logger') 14const logger = require('../helpers/logger')
15const friends = require('../lib/friends')
15const modelUtils = require('./utils') 16const modelUtils = require('./utils')
16const customVideosValidators = require('../helpers/custom-validators').videos 17const customVideosValidators = require('../helpers/custom-validators').videos
17 18
@@ -205,11 +206,24 @@ function afterDestroy (video, options, next) {
205 function (callback) { 206 function (callback) {
206 removeFile(video, callback) 207 removeFile(video, callback)
207 }, 208 },
209
208 function (callback) { 210 function (callback) {
209 removeTorrent(video, callback) 211 removeTorrent(video, callback)
210 }, 212 },
213
211 function (callback) { 214 function (callback) {
212 removePreview(video, callback) 215 removePreview(video, callback)
216 },
217
218 function (callback) {
219 const params = {
220 name: video.name,
221 remoteId: video.id
222 }
223
224 friends.removeVideoToFriends(params)
225
226 return callback()
213 } 227 }
214 ) 228 )
215 } 229 }