aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers/constants.ts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-08-25 11:36:23 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-08-25 11:36:23 +0200
commit93e1258c7cbc0d1235ca6d2a1f7c1875985328b8 (patch)
treeb0a1f77af7ab54dc5f58f569fcd1e9d84b04c533 /server/initializers/constants.ts
parent69f224587e99d56008e1fa129d0641840a486620 (diff)
downloadPeerTube-93e1258c7cbc0d1235ca6d2a1f7c1875985328b8.tar.gz
PeerTube-93e1258c7cbc0d1235ca6d2a1f7c1875985328b8.tar.zst
PeerTube-93e1258c7cbc0d1235ca6d2a1f7c1875985328b8.zip
Move video file metadata in their own table
Will be used for user video quotas and multiple video resolutions
Diffstat (limited to 'server/initializers/constants.ts')
-rw-r--r--server/initializers/constants.ts14
1 files changed, 12 insertions, 2 deletions
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts
index 314a05ab7..50a939083 100644
--- a/server/initializers/constants.ts
+++ b/server/initializers/constants.ts
@@ -15,7 +15,7 @@ import {
15 15
16// --------------------------------------------------------------------------- 16// ---------------------------------------------------------------------------
17 17
18const LAST_MIGRATION_VERSION = 55 18const LAST_MIGRATION_VERSION = 65
19 19
20// --------------------------------------------------------------------------- 20// ---------------------------------------------------------------------------
21 21
@@ -114,7 +114,8 @@ const CONSTRAINTS_FIELDS = {
114 THUMBNAIL_DATA: { min: 0, max: 20000 }, // Bytes 114 THUMBNAIL_DATA: { min: 0, max: 20000 }, // Bytes
115 VIEWS: { min: 0 }, 115 VIEWS: { min: 0 },
116 LIKES: { min: 0 }, 116 LIKES: { min: 0 },
117 DISLIKES: { min: 0 } 117 DISLIKES: { min: 0 },
118 FILE_SIZE: { min: 10, max: 1024 * 1024 * 1024 * 3 /* 3Go */ }
118 }, 119 },
119 VIDEO_EVENTS: { 120 VIDEO_EVENTS: {
120 COUNT: { min: 0 } 121 COUNT: { min: 0 }
@@ -176,6 +177,14 @@ const VIDEO_LANGUAGES = {
176 14: 'Italien' 177 14: 'Italien'
177} 178}
178 179
180const VIDEO_FILE_RESOLUTIONS = {
181 0: 'original',
182 1: '360p',
183 2: '480p',
184 3: '720p',
185 4: '1080p'
186}
187
179// --------------------------------------------------------------------------- 188// ---------------------------------------------------------------------------
180 189
181// Score a pod has when we create it as a friend 190// Score a pod has when we create it as a friend
@@ -362,6 +371,7 @@ export {
362 THUMBNAILS_SIZE, 371 THUMBNAILS_SIZE,
363 USER_ROLES, 372 USER_ROLES,
364 VIDEO_CATEGORIES, 373 VIDEO_CATEGORIES,
374 VIDEO_FILE_RESOLUTIONS,
365 VIDEO_LANGUAGES, 375 VIDEO_LANGUAGES,
366 VIDEO_LICENCES, 376 VIDEO_LICENCES,
367 VIDEO_RATE_TYPES 377 VIDEO_RATE_TYPES