diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-02-26 18:57:33 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-02-26 20:01:26 +0100 |
commit | e4c87ec26962e359d1c70b03ed188a3f19d6a25b (patch) | |
tree | 26fe20e6f600bc6f6f569dde2171b0a2346b135c /server/controllers/api/videos.js | |
parent | 9e167724f7e933f41d9ea2e1c31772bf4c560a28 (diff) | |
download | PeerTube-e4c87ec26962e359d1c70b03ed188a3f19d6a25b.tar.gz PeerTube-e4c87ec26962e359d1c70b03ed188a3f19d6a25b.tar.zst PeerTube-e4c87ec26962e359d1c70b03ed188a3f19d6a25b.zip |
Server: implement video views
Diffstat (limited to 'server/controllers/api/videos.js')
-rw-r--r-- | server/controllers/api/videos.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/server/controllers/api/videos.js b/server/controllers/api/videos.js index 9f4bbb7b7..d64ed4e4e 100644 --- a/server/controllers/api/videos.js +++ b/server/controllers/api/videos.js | |||
@@ -333,6 +333,9 @@ function getVideo (req, res, next) { | |||
333 | // For example, only add a view when a user watch a video during 30s etc | 333 | // For example, only add a view when a user watch a video during 30s etc |
334 | friends.quickAndDirtyUpdateVideoToFriends(videoInstance.id, constants.REQUEST_VIDEO_QADU_TYPES.VIEWS) | 334 | friends.quickAndDirtyUpdateVideoToFriends(videoInstance.id, constants.REQUEST_VIDEO_QADU_TYPES.VIEWS) |
335 | }) | 335 | }) |
336 | } else { | ||
337 | // Just send the event to our friends | ||
338 | friends.addEventToRemoteVideo(videoInstance.id, constants.REQUEST_VIDEO_EVENT_TYPES.VIEWS) | ||
336 | } | 339 | } |
337 | 340 | ||
338 | // Do not wait the view system | 341 | // Do not wait the view system |