aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-09-04 11:25:40 +0200
committerChocobozzz <me@florianbigard.com>2018-09-04 11:25:40 +0200
commitea853b72823b9daff8bfea7177436d22951eb7ef (patch)
tree2a86d78a741f5ab1d8f730ae5487c2050e059f1f /server
parenteb87f9a4a90ffbac43075567eb0ea90e7379c4b2 (diff)
downloadPeerTube-ea853b72823b9daff8bfea7177436d22951eb7ef.tar.gz
PeerTube-ea853b72823b9daff8bfea7177436d22951eb7ef.tar.zst
PeerTube-ea853b72823b9daff8bfea7177436d22951eb7ef.zip
Fix import videos duplicate detection
Diffstat (limited to 'server')
-rw-r--r--server/tools/import-videos.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/tools/import-videos.ts b/server/tools/import-videos.ts
index 812600f8b..3ff194c83 100644
--- a/server/tools/import-videos.ts
+++ b/server/tools/import-videos.ts
@@ -7,7 +7,7 @@ import * as youtubeDL from 'youtube-dl'
7import { VideoPrivacy } from '../../shared/models/videos' 7import { VideoPrivacy } from '../../shared/models/videos'
8import { doRequestAndSaveToFile } from '../helpers/requests' 8import { doRequestAndSaveToFile } from '../helpers/requests'
9import { CONSTRAINTS_FIELDS } from '../initializers' 9import { CONSTRAINTS_FIELDS } from '../initializers'
10import { getClient, getVideoCategories, login, searchVideo, uploadVideo } from '../tests/utils' 10import { getClient, getVideoCategories, login, searchVideoWithSort, uploadVideo } from '../tests/utils'
11import { truncate } from 'lodash' 11import { truncate } from 'lodash'
12import * as prompt from 'prompt' 12import * as prompt from 'prompt'
13import { remove } from 'fs-extra' 13import { remove } from 'fs-extra'
@@ -113,7 +113,7 @@ function processVideo (info: any, languageCode: string) {
113 const videoInfo = await fetchObject(info) 113 const videoInfo = await fetchObject(info)
114 if (program['verbose']) console.log('Fetched object.', videoInfo) 114 if (program['verbose']) console.log('Fetched object.', videoInfo)
115 115
116 const result = await searchVideo(program['url'], videoInfo.title) 116 const result = await searchVideoWithSort(program['url'], videoInfo.title, '-match')
117 117
118 console.log('############################################################\n') 118 console.log('############################################################\n')
119 119