diff --git a/server/tools/import-youtube.ts b/server/tools/import-youtube.ts index 82f48d8f7..68893306f 100644 --- a/server/tools/import-youtube.ts +++ b/server/tools/import-youtube.ts @@ -76,7 +76,7 @@ function processVideo (video: { name: string, url: string }, languageCode: numbe console.log('############################################################\n') - if (result.body.total !== 0) { + if (result.body.data.find(v => v.name === video.name)) { console.log('Video "%s" already exists, don\'t reupload it.\n', video.name) return res() }