aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tools/peertube-redundancy.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tools/peertube-redundancy.ts')
-rw-r--r--server/tools/peertube-redundancy.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/server/tools/peertube-redundancy.ts b/server/tools/peertube-redundancy.ts
index 2c62a3c19..4bb9fbc5a 100644
--- a/server/tools/peertube-redundancy.ts
+++ b/server/tools/peertube-redundancy.ts
@@ -1,13 +1,12 @@
1import CliTable3 from 'cli-table3' 1import CliTable3 from 'cli-table3'
2import { Command, program } from 'commander' 2import { Command, program } from 'commander'
3import { uniq } from 'lodash'
4import { URL } from 'url' 3import { URL } from 'url'
5import validator from 'validator' 4import validator from 'validator'
5import { uniqify } from '@shared/core-utils'
6import { HttpStatusCode, VideoRedundanciesTarget } from '@shared/models' 6import { HttpStatusCode, VideoRedundanciesTarget } from '@shared/models'
7import { assignToken, buildServer, getServerCredentials } from './cli' 7import { assignToken, buildServer, getServerCredentials } from './cli'
8 8
9import bytes = require('bytes') 9import bytes = require('bytes')
10
11program 10program
12 .name('redundancy') 11 .name('redundancy')
13 .usage('[command] [options]') 12 .usage('[command] [options]')
@@ -77,7 +76,7 @@ async function listRedundanciesCLI (target: VideoRedundanciesTarget) {
77 totalSize = bytes(tmp) 76 totalSize = bytes(tmp)
78 } 77 }
79 78
80 const instances = uniq( 79 const instances = uniqify(
81 webtorrentFiles.concat(streamingPlaylists) 80 webtorrentFiles.concat(streamingPlaylists)
82 .map(r => r.fileUrl) 81 .map(r => r.fileUrl)
83 .map(u => new URL(u).host) 82 .map(u => new URL(u).host)