aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tools
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-08-17 15:36:03 +0200
committerChocobozzz <me@florianbigard.com>2022-08-17 15:36:03 +0200
commit690bb8f9f3413147a4f71d5ff0a3cd8170a94ce3 (patch)
treeb16b8536acd2098aba8c1d6fe13a336dd6aa01a9 /server/tools
parentbbd5aa7ead5f1554a0872963f957effc26d8c630 (diff)
downloadPeerTube-690bb8f9f3413147a4f71d5ff0a3cd8170a94ce3.tar.gz
PeerTube-690bb8f9f3413147a4f71d5ff0a3cd8170a94ce3.tar.zst
PeerTube-690bb8f9f3413147a4f71d5ff0a3cd8170a94ce3.zip
Prefer using Object.values
Diffstat (limited to 'server/tools')
-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)