// ---------------------------------------------------------------------------
-const LAST_MIGRATION_VERSION = 65
+const LAST_MIGRATION_VERSION = 70
// ---------------------------------------------------------------------------
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')
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
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
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')