]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/initializers/constants.ts
Add RSS feed to subscribe button
[github/Chocobozzz/PeerTube.git] / server / initializers / constants.ts
index 03424ffb8f4d2ffc4f9adea006d728c14673c33f..de426c16e0ad35d731d8ac8d7f3c3945d2e17f1c 100644 (file)
@@ -119,7 +119,7 @@ const JOB_TTL: { [ id in JobType ]: number } = {
   'activitypub-follow': 60000 * 10, // 10 minutes
   'video-file-import': 1000 * 3600, // 1 hour
   'video-file': 1000 * 3600 * 48, // 2 days, transcoding could be long
-  'video-import': 1000 * 3600 * 5, // 5 hours
+  'video-import': 1000 * 3600, // 1 hour
   'email': 60000 * 10, // 10 minutes
   'videos-views': undefined // Unlimited
 }
@@ -601,7 +601,6 @@ const MEMOIZE_TTL = {
 
 const REDUNDANCY = {
   VIDEOS: {
-    EXPIRES_AFTER_MS: 48 * 3600 * 1000, // 2 days
     RANDOMIZED_FACTOR: 5
   }
 }
@@ -750,10 +749,16 @@ function updateWebserverConfig () {
   CONFIG.WEBSERVER.HOST = sanitizeHost(CONFIG.WEBSERVER.HOSTNAME + ':' + CONFIG.WEBSERVER.PORT, REMOTE_SCHEME.HTTP)
 }
 
-function buildVideosRedundancy (objs: VideosRedundancy[]): VideosRedundancy[] {
+function buildVideosRedundancy (objs: any[]): VideosRedundancy[] {
   if (!objs) return []
 
-  return objs.map(obj => Object.assign(obj, { size: bytes.parse(obj.size) }))
+  return objs.map(obj => {
+    return Object.assign(obj, {
+      minLifetime: parseDuration(obj.min_lifetime),
+      size: bytes.parse(obj.size),
+      minViews: obj.min_views
+    })
+  })
 }
 
 function buildLanguages () {