aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tools/import-youtube.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tools/import-youtube.ts')
-rw-r--r--server/tools/import-youtube.ts7
1 files changed, 5 insertions, 2 deletions
diff --git a/server/tools/import-youtube.ts b/server/tools/import-youtube.ts
index 295109cd8..ab91afbc0 100644
--- a/server/tools/import-youtube.ts
+++ b/server/tools/import-youtube.ts
@@ -62,7 +62,7 @@ async function run () {
62 console.log('Will download and upload %d videos.\n', videos.length) 62 console.log('Will download and upload %d videos.\n', videos.length)
63 63
64 for (const video of videos) { 64 for (const video of videos) {
65 await processVideo(video, program['languageCode']) 65 await processVideo(video, program['language'])
66 } 66 }
67 67
68 console.log('I\'m finished!') 68 console.log('I\'m finished!')
@@ -107,7 +107,10 @@ async function uploadVideoOnPeerTube (videoInfo: any, videoPath: string, languag
107 const licence = getLicence(videoInfo.license) 107 const licence = getLicence(videoInfo.license)
108 let tags = [] 108 let tags = []
109 if (Array.isArray(videoInfo.tags)) { 109 if (Array.isArray(videoInfo.tags)) {
110 tags = videoInfo.tags.filter(t => t.length < CONSTRAINTS_FIELDS.VIDEOS.TAG.max).slice(0, 5) 110 tags = videoInfo.tags
111 .filter(t => t.length < CONSTRAINTS_FIELDS.VIDEOS.TAG.max)
112 .map(t => t.normalize())
113 .slice(0, 5)
111 } 114 }
112 115
113 let thumbnailfile 116 let thumbnailfile