]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/initializers/constants.ts
Add follow tests
[github/Chocobozzz/PeerTube.git] / server / initializers / constants.ts
index dca223370a57f06049f93011064819d09c26e188..7c0640cc0902588b8817c6807a9ac74bbbd71457 100644 (file)
@@ -134,7 +134,7 @@ const CONSTRAINTS_FIELDS = {
     VIEWS: { min: 0 },
     LIKES: { min: 0 },
     DISLIKES: { min: 0 },
-    FILE_SIZE: { min: 10, max: 1024 * 1024 * 1024 * 3 /* 3Go */ },
+    FILE_SIZE: { min: 10, max: 1024 * 1024 * 1024 * 10 /* 10Go */ },
     URL: { min: 3, max: 2000 } // Length
   },
   ACCOUNTS: {
@@ -223,17 +223,16 @@ const FRIEND_SCORE = {
 }
 
 const SERVER_ACCOUNT_NAME = 'peertube'
-const ACTIVITY_PUB_ACCEPT_HEADER = 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"'
 
 const ACTIVITY_PUB = {
+  ACCEPT_HEADER: 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"',
+  PUBLIC: 'https://www.w3.org/ns/activitystreams#Public',
   COLLECTION_ITEMS_PER_PAGE: 10,
-  VIDEO_URL_MIME_TYPES: [
-    'video/mp4',
-    'video/webm',
-    'video/ogg',
-    'application/x-bittorrent',
-    'application/x-bittorrent;x-scheme-handler/magnet'
-  ]
+  URL_MIME_TYPES: {
+    VIDEO: [ 'video/mp4', 'video/webm', 'video/ogg' ], // TODO: Merge with VIDEO_MIMETYPE_EXT
+    TORRENT: [ 'application/x-bittorrent' ],
+    MAGNET: [ 'application/x-bittorrent;x-scheme-handler/magnet' ]
+  }
 }
 
 // ---------------------------------------------------------------------------
@@ -262,7 +261,7 @@ const JOB_STATES: { [ id: string ]: JobState } = {
 }
 const JOB_CATEGORIES: { [ id: string ]: JobCategory } = {
   TRANSCODING: 'transcoding',
-  HTTP_REQUEST: 'http-request'
+  ACTIVITYPUB_HTTP: 'activitypub-http'
 }
 // How many maximum jobs we fetch from the database per cycle
 const JOBS_FETCH_LIMIT_PER_CYCLE = {
@@ -324,7 +323,7 @@ const OPENGRAPH_AND_OEMBED_COMMENT = '<!-- open graph and oembed tags -->'
 if (isTestInstance() === true) {
   CONSTRAINTS_FIELDS.VIDEOS.DURATION.max = 14
   FRIEND_SCORE.BASE = 20
-  JOBS_FETCHING_INTERVAL = 10000
+  JOBS_FETCHING_INTERVAL = 1000
   REMOTE_SCHEME.HTTP = 'http'
   REMOTE_SCHEME.WS = 'ws'
   STATIC_MAX_AGE = '0'
@@ -351,7 +350,6 @@ export {
   SERVERS_SCORE,
   PREVIEWS_SIZE,
   REMOTE_SCHEME,
-  ACTIVITY_PUB_ACCEPT_HEADER,
   FOLLOW_STATES,
   SEARCHABLE_COLUMNS,
   SERVER_ACCOUNT_NAME,