Relax on tags (accept any characters and not required anymore)
[oweals/peertube.git] / server / initializers / constants.js
index 96321b211041e91885e2b39074d31f2a6567a3df..40f01e389f123f18d8b6b9fbb83d678069bc0da4 100644 (file)
@@ -5,7 +5,7 @@ const path = require('path')
 
 // ---------------------------------------------------------------------------
 
-const LAST_MIGRATION_VERSION = 25
+const LAST_MIGRATION_VERSION = 30
 
 // ---------------------------------------------------------------------------
 
@@ -85,7 +85,7 @@ const CONSTRAINTS_FIELDS = {
     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
     DURATION: { min: 1, max: 7200 }, // Number
-    TAGS: { min: 1, max: 3 }, // Number of total tags
+    TAGS: { min: 0, max: 3 }, // Number of total tags
     TAG: { min: 2, max: 10 }, // Length
     THUMBNAIL: { min: 2, max: 30 },
     THUMBNAIL_DATA: { min: 0, max: 20000 }, // Bytes
@@ -103,6 +103,27 @@ const VIDEO_RATE_TYPES = {
   DISLIKE: 'dislike'
 }
 
+const VIDEO_CATEGORIES = {
+  1: 'Music',
+  2: 'Films',
+  3: 'Vehicles',
+  4: 'Art',
+  5: 'Sports',
+  6: 'Travels',
+  7: 'Gaming',
+  8: 'People',
+  9: 'Comedy',
+  10: 'Entertainment',
+  11: 'News',
+  12: 'Howto',
+  13: 'Education',
+  14: 'Activism',
+  15: 'Science & Technology',
+  16: 'Animals',
+  17: 'Kids',
+  18: 'Food'
+}
+
 // ---------------------------------------------------------------------------
 
 // Score a pod has when we create it as a friend
@@ -258,6 +279,7 @@ module.exports = {
   STATIC_PATHS,
   THUMBNAILS_SIZE,
   USER_ROLES,
+  VIDEO_CATEGORIES,
   VIDEO_RATE_TYPES
 }