diff options
Diffstat (limited to 'server/tools')
-rw-r--r-- | server/tools/peertube-redundancy.ts | 5 |
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 @@ | |||
1 | import CliTable3 from 'cli-table3' | 1 | import CliTable3 from 'cli-table3' |
2 | import { Command, program } from 'commander' | 2 | import { Command, program } from 'commander' |
3 | import { uniq } from 'lodash' | ||
4 | import { URL } from 'url' | 3 | import { URL } from 'url' |
5 | import validator from 'validator' | 4 | import validator from 'validator' |
5 | import { uniqify } from '@shared/core-utils' | ||
6 | import { HttpStatusCode, VideoRedundanciesTarget } from '@shared/models' | 6 | import { HttpStatusCode, VideoRedundanciesTarget } from '@shared/models' |
7 | import { assignToken, buildServer, getServerCredentials } from './cli' | 7 | import { assignToken, buildServer, getServerCredentials } from './cli' |
8 | 8 | ||
9 | import bytes = require('bytes') | 9 | import bytes = require('bytes') |
10 | |||
11 | program | 10 | program |
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) |