aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tools
diff options
context:
space:
mode:
Diffstat (limited to 'server/tools')
-rw-r--r--server/tools/import-videos.ts7
1 files changed, 6 insertions, 1 deletions
diff --git a/server/tools/import-videos.ts b/server/tools/import-videos.ts
index baaedd329..27d0732a6 100644
--- a/server/tools/import-videos.ts
+++ b/server/tools/import-videos.ts
@@ -6,6 +6,7 @@ import { unlinkPromise } from '../helpers/core-utils'
6import { doRequestAndSaveToFile } from '../helpers/requests' 6import { doRequestAndSaveToFile } from '../helpers/requests'
7import { CONSTRAINTS_FIELDS } from '../initializers' 7import { CONSTRAINTS_FIELDS } from '../initializers'
8import { getClient, getVideoCategories, login, searchVideo, uploadVideo } from '../tests/utils' 8import { getClient, getVideoCategories, login, searchVideo, uploadVideo } from '../tests/utils'
9import { truncate } from 'lodash'
9 10
10program 11program
11 .option('-u, --url <url>', 'Server url') 12 .option('-u, --url <url>', 'Server url')
@@ -133,7 +134,11 @@ async function uploadVideoOnPeerTube (videoInfo: any, videoPath: string, languag
133 } 134 }
134 135
135 const videoAttributes = { 136 const videoAttributes = {
136 name: videoInfo.title, 137 name: truncate(videoInfo.title, {
138 'length': CONSTRAINTS_FIELDS.VIDEOS.NAME.max,
139 'separator': /,? +/,
140 'omission': ' […]'
141 }),
137 category, 142 category,
138 licence, 143 licence,
139 language, 144 language,