aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers/constants.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-08-07 09:54:36 +0200
committerChocobozzz <me@florianbigard.com>2018-08-08 09:30:31 +0200
commit990b6a0b0c4fbebc165e5cf7cec8fbc1cbaa6c66 (patch)
tree8aaa0638798bfa14813f4d6ed5247242313b9ce6 /server/initializers/constants.ts
parentce33919c24e7402d92d81f3cd8e545df52d98240 (diff)
downloadPeerTube-990b6a0b0c4fbebc165e5cf7cec8fbc1cbaa6c66.tar.gz
PeerTube-990b6a0b0c4fbebc165e5cf7cec8fbc1cbaa6c66.tar.zst
PeerTube-990b6a0b0c4fbebc165e5cf7cec8fbc1cbaa6c66.zip
Import torrents with webtorrent
Diffstat (limited to 'server/initializers/constants.ts')
-rw-r--r--server/initializers/constants.ts11
1 files changed, 11 insertions, 0 deletions
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts
index 243d544ea..cf7cd3d74 100644
--- a/server/initializers/constants.ts
+++ b/server/initializers/constants.ts
@@ -273,6 +273,12 @@ const CONSTRAINTS_FIELDS = {
273 VIDEO_IMPORTS: { 273 VIDEO_IMPORTS: {
274 URL: { min: 3, max: 2000 }, // Length 274 URL: { min: 3, max: 2000 }, // Length
275 TORRENT_NAME: { min: 3, max: 255 }, // Length 275 TORRENT_NAME: { min: 3, max: 255 }, // Length
276 TORRENT_FILE: {
277 EXTNAME: [ '.torrent' ],
278 FILE_SIZE: {
279 max: 1024 * 200 // 200 KB
280 }
281 }
276 }, 282 },
277 VIDEOS: { 283 VIDEOS: {
278 NAME: { min: 3, max: 120 }, // Length 284 NAME: { min: 3, max: 120 }, // Length
@@ -417,6 +423,10 @@ const VIDEO_CAPTIONS_MIMETYPE_EXT = {
417 'application/x-subrip': '.srt' 423 'application/x-subrip': '.srt'
418} 424}
419 425
426const TORRENT_MIMETYPE_EXT = {
427 'application/x-bittorrent': '.torrent'
428}
429
420// --------------------------------------------------------------------------- 430// ---------------------------------------------------------------------------
421 431
422const SERVER_ACTOR_NAME = 'peertube' 432const SERVER_ACTOR_NAME = 'peertube'
@@ -596,6 +606,7 @@ export {
596 FEEDS, 606 FEEDS,
597 JOB_TTL, 607 JOB_TTL,
598 NSFW_POLICY_TYPES, 608 NSFW_POLICY_TYPES,
609 TORRENT_MIMETYPE_EXT,
599 STATIC_MAX_AGE, 610 STATIC_MAX_AGE,
600 STATIC_PATHS, 611 STATIC_PATHS,
601 ACTIVITY_PUB, 612 ACTIVITY_PUB,