aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/initializers/constants.ts2
-rw-r--r--server/tools/import-videos.ts8
2 files changed, 7 insertions, 3 deletions
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts
index 705d9b520..481b21bbb 100644
--- a/server/initializers/constants.ts
+++ b/server/initializers/constants.ts
@@ -226,7 +226,7 @@ const CONSTRAINTS_FIELDS = {
226 COUNT: { min: 0 } 226 COUNT: { min: 0 }
227 }, 227 },
228 VIDEO_COMMENTS: { 228 VIDEO_COMMENTS: {
229 TEXT: { min: 2, max: 3000 }, // Length 229 TEXT: { min: 1, max: 3000 }, // Length
230 URL: { min: 3, max: 2000 } // Length 230 URL: { min: 3, max: 2000 } // Length
231 }, 231 },
232 VIDEO_SHARE: { 232 VIDEO_SHARE: {
diff --git a/server/tools/import-videos.ts b/server/tools/import-videos.ts
index 433cee652..baaedd329 100644
--- a/server/tools/import-videos.ts
+++ b/server/tools/import-videos.ts
@@ -53,7 +53,10 @@ async function run () {
53 53
54 const options = [ '-j', '--flat-playlist', '--playlist-reverse' ] 54 const options = [ '-j', '--flat-playlist', '--playlist-reverse' ]
55 youtubeDL.getInfo(program['targetUrl'], options, processOptions, async (err, info) => { 55 youtubeDL.getInfo(program['targetUrl'], options, processOptions, async (err, info) => {
56 if (err) throw err 56 if (err) {
57 console.log(err.message)
58 process.exit(1)
59 }
57 60
58 let infoArray: any[] 61 let infoArray: any[]
59 62
@@ -157,7 +160,8 @@ async function uploadVideoOnPeerTube (videoInfo: any, videoPath: string, languag
157 160
158 await uploadVideo(program['url'], accessToken, videoAttributes) 161 await uploadVideo(program['url'], accessToken, videoAttributes)
159 } else { 162 } else {
160 throw err 163 console.log(err.message)
164 process.exit(1)
161 } 165 }
162 } 166 }
163 167