]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/initializers/constants.ts
Fix request schedulers test
[github/Chocobozzz/PeerTube.git] / server / initializers / constants.ts
index 50a939083c7db721ddad6ee2032b849fed4f0cb6..e6af406e386bab2f8f7cd5827f5235d5cdceb029 100644 (file)
@@ -15,7 +15,7 @@ import {
 
 // ---------------------------------------------------------------------------
 
-const LAST_MIGRATION_VERSION = 65
+const LAST_MIGRATION_VERSION = 70
 
 // ---------------------------------------------------------------------------
 
@@ -79,6 +79,9 @@ const CONFIG = {
     ENABLED: config.get<boolean>('signup.enabled'),
     LIMIT: config.get<number>('signup.limit')
   },
+  USER: {
+    VIDEO_QUOTA: config.get<number>('user.video_quota')
+  },
   TRANSCODING: {
     ENABLED: config.get<boolean>('transcoding.enabled'),
     THREADS: config.get<number>('transcoding.threads')
@@ -97,7 +100,8 @@ CONFIG.WEBSERVER.HOST = CONFIG.WEBSERVER.HOSTNAME + ':' + CONFIG.WEBSERVER.PORT
 const CONSTRAINTS_FIELDS = {
   USERS: {
     USERNAME: { min: 3, max: 20 }, // Length
-    PASSWORD: { min: 6, max: 255 } // Length
+    PASSWORD: { min: 6, max: 255 }, // Length
+    VIDEO_QUOTA: { min: -1 }
   },
   VIDEO_ABUSES: {
     REASON: { min: 2, max: 300 } // Length
@@ -106,7 +110,7 @@ const CONSTRAINTS_FIELDS = {
     NAME: { min: 3, max: 50 }, // Length
     DESCRIPTION: { min: 3, max: 250 }, // Length
     EXTNAME: [ '.mp4', '.ogv', '.webm' ],
-    INFO_HASH: { min: 40, max: 40 }, // Length, infohash is 20 bytes length but we represent it in hexa so 20 * 2
+    INFO_HASH: { min: 40, max: 40 }, // Length, info hash is 20 bytes length but we represent it in hexadecimal so 20 * 2
     DURATION: { min: 1, max: 7200 }, // Number
     TAGS: { min: 0, max: 3 }, // Number of total tags
     TAG: { min: 2, max: 10 }, // Length
@@ -294,7 +298,7 @@ let STATIC_MAX_AGE = '30d'
 const THUMBNAILS_SIZE = '200x110'
 const PREVIEWS_SIZE = '640x480'
 
-// Subfolders of cache directory
+// Sub folders of cache directory
 const CACHE = {
   DIRECTORIES: {
     PREVIEWS: join(CONFIG.STORAGE.CACHE_DIR, 'previews')