parent
60a26a559c
commit
45b8a42ca1
|
@ -6,6 +6,7 @@ import { unlinkPromise } from '../helpers/core-utils'
|
||||||
import { doRequestAndSaveToFile } from '../helpers/requests'
|
import { doRequestAndSaveToFile } from '../helpers/requests'
|
||||||
import { CONSTRAINTS_FIELDS } from '../initializers'
|
import { CONSTRAINTS_FIELDS } from '../initializers'
|
||||||
import { getClient, getVideoCategories, login, searchVideo, uploadVideo } from '../tests/utils'
|
import { getClient, getVideoCategories, login, searchVideo, uploadVideo } from '../tests/utils'
|
||||||
|
import { truncate } from 'lodash'
|
||||||
|
|
||||||
program
|
program
|
||||||
.option('-u, --url <url>', 'Server url')
|
.option('-u, --url <url>', 'Server url')
|
||||||
|
@ -133,7 +134,11 @@ async function uploadVideoOnPeerTube (videoInfo: any, videoPath: string, languag
|
||||||
}
|
}
|
||||||
|
|
||||||
const videoAttributes = {
|
const videoAttributes = {
|
||||||
name: videoInfo.title,
|
name: truncate(videoInfo.title, {
|
||||||
|
'length': CONSTRAINTS_FIELDS.VIDEOS.NAME.max,
|
||||||
|
'separator': /,? +/,
|
||||||
|
'omission': ' […]'
|
||||||
|
}),
|
||||||
category,
|
category,
|
||||||
licence,
|
licence,
|
||||||
language,
|
language,
|
||||||
|
|
Loading…
Reference in New Issue