diff options
author | Chocobozzz <me@florianbigard.com> | 2018-09-04 11:25:40 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-09-04 11:25:40 +0200 |
commit | ea853b72823b9daff8bfea7177436d22951eb7ef (patch) | |
tree | 2a86d78a741f5ab1d8f730ae5487c2050e059f1f | |
parent | eb87f9a4a90ffbac43075567eb0ea90e7379c4b2 (diff) | |
download | PeerTube-ea853b72823b9daff8bfea7177436d22951eb7ef.tar.gz PeerTube-ea853b72823b9daff8bfea7177436d22951eb7ef.tar.zst PeerTube-ea853b72823b9daff8bfea7177436d22951eb7ef.zip |
Fix import videos duplicate detection
-rw-r--r-- | server/tools/import-videos.ts | 4 |
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' | |||
7 | import { VideoPrivacy } from '../../shared/models/videos' | 7 | import { VideoPrivacy } from '../../shared/models/videos' |
8 | import { doRequestAndSaveToFile } from '../helpers/requests' | 8 | import { doRequestAndSaveToFile } from '../helpers/requests' |
9 | import { CONSTRAINTS_FIELDS } from '../initializers' | 9 | import { CONSTRAINTS_FIELDS } from '../initializers' |
10 | import { getClient, getVideoCategories, login, searchVideo, uploadVideo } from '../tests/utils' | 10 | import { getClient, getVideoCategories, login, searchVideoWithSort, uploadVideo } from '../tests/utils' |
11 | import { truncate } from 'lodash' | 11 | import { truncate } from 'lodash' |
12 | import * as prompt from 'prompt' | 12 | import * as prompt from 'prompt' |
13 | import { remove } from 'fs-extra' | 13 | import { 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 | ||