projects
/
oweals
/
peertube.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5f26c73
)
Fix duplicates detection
author
Chocobozzz
<me@florianbigard.com>
Fri, 16 Feb 2018 10:03:42 +0000
(11:03 +0100)
committer
Chocobozzz
<me@florianbigard.com>
Fri, 16 Feb 2018 10:03:42 +0000
(11:03 +0100)
server/tools/import-youtube.ts
patch
|
blob
|
history
diff --git
a/server/tools/import-youtube.ts
b/server/tools/import-youtube.ts
index 82f48d8f7164addf8aa235e4f033552b234377fe..68893306f9c87efaca1609f7d5848e7b5b5323c8 100644
(file)
--- 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()
}