diff options
author | Chocobozzz <me@florianbigard.com> | 2022-08-17 15:36:03 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-08-17 15:36:03 +0200 |
commit | 690bb8f9f3413147a4f71d5ff0a3cd8170a94ce3 (patch) | |
tree | b16b8536acd2098aba8c1d6fe13a336dd6aa01a9 /server/tools/peertube-redundancy.ts | |
parent | bbd5aa7ead5f1554a0872963f957effc26d8c630 (diff) | |
download | PeerTube-690bb8f9f3413147a4f71d5ff0a3cd8170a94ce3.tar.gz PeerTube-690bb8f9f3413147a4f71d5ff0a3cd8170a94ce3.tar.zst PeerTube-690bb8f9f3413147a4f71d5ff0a3cd8170a94ce3.zip |
Prefer using Object.values
Diffstat (limited to 'server/tools/peertube-redundancy.ts')
-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) |