diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-05-16 19:49:10 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-05-16 19:49:10 +0200 |
commit | 67100f1f971dd10a466a321899b56c0813e08d31 (patch) | |
tree | 3253db23a9dca2273fd2c9702fb3b6f1801c0f1c /server/initializers/constants.js | |
parent | dcc7b3fe470fe5f1546c0f3e7c28c07fc54633c5 (diff) | |
download | PeerTube-67100f1f971dd10a466a321899b56c0813e08d31.tar.gz PeerTube-67100f1f971dd10a466a321899b56c0813e08d31.tar.zst PeerTube-67100f1f971dd10a466a321899b56c0813e08d31.zip |
Add a check for the duration of videos
Diffstat (limited to 'server/initializers/constants.js')
-rw-r--r-- | server/initializers/constants.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/server/initializers/constants.js b/server/initializers/constants.js index 48e660fe2..d87a376d3 100644 --- a/server/initializers/constants.js +++ b/server/initializers/constants.js | |||
@@ -9,6 +9,9 @@ let FRIEND_BASE_SCORE = 100 | |||
9 | // Time to wait between requests to the friends | 9 | // Time to wait between requests to the friends |
10 | let INTERVAL = 60000 | 10 | let INTERVAL = 60000 |
11 | 11 | ||
12 | // 2 hours maximum for the duration of a video (in seconds) | ||
13 | let MAXIMUM_VIDEO_DURATION = 7200 | ||
14 | |||
12 | // Number of results by default for the pagination | 15 | // Number of results by default for the pagination |
13 | const PAGINATION_COUNT_DEFAULT = 15 | 16 | const PAGINATION_COUNT_DEFAULT = 15 |
14 | 17 | ||
@@ -31,6 +34,7 @@ const THUMBNAILS_STATIC_PATH = '/static/thumbnails' | |||
31 | if (isTestInstance() === true) { | 34 | if (isTestInstance() === true) { |
32 | FRIEND_BASE_SCORE = 20 | 35 | FRIEND_BASE_SCORE = 20 |
33 | INTERVAL = 10000 | 36 | INTERVAL = 10000 |
37 | MAXIMUM_VIDEO_DURATION = 14 | ||
34 | REQUEST_RETRIES = 2 | 38 | REQUEST_RETRIES = 2 |
35 | } | 39 | } |
36 | 40 | ||
@@ -40,6 +44,7 @@ module.exports = { | |||
40 | API_VERSION: API_VERSION, | 44 | API_VERSION: API_VERSION, |
41 | FRIEND_BASE_SCORE: FRIEND_BASE_SCORE, | 45 | FRIEND_BASE_SCORE: FRIEND_BASE_SCORE, |
42 | INTERVAL: INTERVAL, | 46 | INTERVAL: INTERVAL, |
47 | MAXIMUM_VIDEO_DURATION: MAXIMUM_VIDEO_DURATION, | ||
43 | PAGINATION_COUNT_DEFAULT: PAGINATION_COUNT_DEFAULT, | 48 | PAGINATION_COUNT_DEFAULT: PAGINATION_COUNT_DEFAULT, |
44 | PODS_SCORE: PODS_SCORE, | 49 | PODS_SCORE: PODS_SCORE, |
45 | REQUEST_RETRIES: REQUEST_RETRIES, | 50 | REQUEST_RETRIES: REQUEST_RETRIES, |