X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftools%2Fpeertube-redundancy.ts;h=4bb9fbc5a414e0ca00d80b57e0c7955abd31d781;hb=f67ac646a2c081e02b28a7ab1dc856db6ee20e2f;hp=73b026ac8f40e6f941733330fd5ccfe3eeb69aa3;hpb=9e8789497377cac5554a622da605f5b89587aa9c;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tools/peertube-redundancy.ts b/server/tools/peertube-redundancy.ts index 73b026ac8..4bb9fbc5a 100644 --- a/server/tools/peertube-redundancy.ts +++ b/server/tools/peertube-redundancy.ts @@ -1,18 +1,14 @@ -import { registerTSPaths } from '../helpers/register-ts-paths' -registerTSPaths() - -import * as CliTable3 from 'cli-table3' +import CliTable3 from 'cli-table3' import { Command, program } from 'commander' -import { uniq } from 'lodash' import { URL } from 'url' import validator from 'validator' +import { uniqify } from '@shared/core-utils' import { HttpStatusCode, VideoRedundanciesTarget } from '@shared/models' import { assignToken, buildServer, getServerCredentials } from './cli' import bytes = require('bytes') - program - .name('plugins') + .name('redundancy') .usage('[command] [options]') program @@ -80,7 +76,7 @@ async function listRedundanciesCLI (target: VideoRedundanciesTarget) { totalSize = bytes(tmp) } - const instances = uniq( + const instances = uniqify( webtorrentFiles.concat(streamingPlaylists) .map(r => r.fileUrl) .map(u => new URL(u).host)