diff options
author | Chocobozzz <me@florianbigard.com> | 2018-08-30 14:58:00 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-08-31 09:19:58 +0200 |
commit | 2d3741d6d92e9bd1f41694c7442a6d1da434e1f2 (patch) | |
tree | 93a1e609e14bc14ca9e77a6661ddc9c0e461d6f3 /server/initializers | |
parent | d9eaee3939bf2e93e5d775d32bce77842201faba (diff) | |
download | PeerTube-2d3741d6d92e9bd1f41694c7442a6d1da434e1f2.tar.gz PeerTube-2d3741d6d92e9bd1f41694c7442a6d1da434e1f2.tar.zst PeerTube-2d3741d6d92e9bd1f41694c7442a6d1da434e1f2.zip |
Videos overview page: first version
Diffstat (limited to 'server/initializers')
-rw-r--r-- | server/initializers/constants.ts | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts index 5d93c6b82..16d8dca68 100644 --- a/server/initializers/constants.ts +++ b/server/initializers/constants.ts | |||
@@ -58,6 +58,9 @@ const ROUTE_CACHE_LIFETIME = { | |||
58 | ROBOTS: '2 hours', | 58 | ROBOTS: '2 hours', |
59 | NODEINFO: '10 minutes', | 59 | NODEINFO: '10 minutes', |
60 | DNT_POLICY: '1 week', | 60 | DNT_POLICY: '1 week', |
61 | OVERVIEWS: { | ||
62 | VIDEOS: '1 hour' | ||
63 | }, | ||
61 | ACTIVITY_PUB: { | 64 | ACTIVITY_PUB: { |
62 | VIDEOS: '1 second' // 1 second, cache concurrent requests after a broadcast for example | 65 | VIDEOS: '1 second' // 1 second, cache concurrent requests after a broadcast for example |
63 | } | 66 | } |
@@ -464,6 +467,15 @@ const TORRENT_MIMETYPE_EXT = { | |||
464 | 467 | ||
465 | // --------------------------------------------------------------------------- | 468 | // --------------------------------------------------------------------------- |
466 | 469 | ||
470 | const OVERVIEWS = { | ||
471 | VIDEOS: { | ||
472 | SAMPLE_THRESHOLD: 4, | ||
473 | SAMPLES_COUNT: 2 | ||
474 | } | ||
475 | } | ||
476 | |||
477 | // --------------------------------------------------------------------------- | ||
478 | |||
467 | const SERVER_ACTOR_NAME = 'peertube' | 479 | const SERVER_ACTOR_NAME = 'peertube' |
468 | 480 | ||
469 | const ACTIVITY_PUB = { | 481 | const ACTIVITY_PUB = { |
@@ -666,6 +678,7 @@ export { | |||
666 | USER_PASSWORD_RESET_LIFETIME, | 678 | USER_PASSWORD_RESET_LIFETIME, |
667 | USER_EMAIL_VERIFY_LIFETIME, | 679 | USER_EMAIL_VERIFY_LIFETIME, |
668 | IMAGE_MIMETYPE_EXT, | 680 | IMAGE_MIMETYPE_EXT, |
681 | OVERVIEWS, | ||
669 | SCHEDULER_INTERVALS_MS, | 682 | SCHEDULER_INTERVALS_MS, |
670 | REPEAT_JOBS, | 683 | REPEAT_JOBS, |
671 | STATIC_DOWNLOAD_PATHS, | 684 | STATIC_DOWNLOAD_PATHS, |