From b5c0e95544cec5a33cee3df41c1607d2a0cd5403 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 23 Feb 2018 16:39:51 +0100 Subject: Avoids easy cheating on vidoe views --- server/initializers/constants.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'server/initializers') diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts index 328a3e70a..2dc73770d 100644 --- a/server/initializers/constants.ts +++ b/server/initializers/constants.ts @@ -231,6 +231,8 @@ const CONSTRAINTS_FIELDS = { } } +let VIDEO_VIEW_LIFETIME = 60000 * 60 // 1 hour + const VIDEO_RATE_TYPES: { [ id: string ]: VideoRateType } = { LIKE: 'like', DISLIKE: 'dislike' @@ -400,6 +402,7 @@ if (isTestInstance() === true) { ACTIVITY_PUB.ACTOR_REFRESH_INTERVAL = 10 * 1000 // 10 seconds CONSTRAINTS_FIELDS.ACTORS.AVATAR.FILE_SIZE.max = 100 * 1024 // 100KB SCHEDULER_INTERVAL = 10000 + VIDEO_VIEW_LIFETIME = 1000 // 1 second } updateWebserverConfig() @@ -442,7 +445,8 @@ export { USER_PASSWORD_RESET_LIFETIME, IMAGE_MIMETYPE_EXT, SCHEDULER_INTERVAL, - JOB_COMPLETED_LIFETIME + JOB_COMPLETED_LIFETIME, + VIDEO_VIEW_LIFETIME } // --------------------------------------------------------------------------- -- cgit v1.2.3