diff options
Diffstat (limited to 'scripts/prune-storage.ts')
-rwxr-xr-x | scripts/prune-storage.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/prune-storage.ts b/scripts/prune-storage.ts index bb1e8e024..3012bdb94 100755 --- a/scripts/prune-storage.ts +++ b/scripts/prune-storage.ts | |||
@@ -1,11 +1,11 @@ | |||
1 | import { map } from 'bluebird' | 1 | import { map } from 'bluebird' |
2 | import { readdir, remove, stat } from 'fs-extra' | 2 | import { readdir, remove, stat } from 'fs-extra' |
3 | import { uniq, values } from 'lodash' | ||
4 | import { basename, join } from 'path' | 3 | import { basename, join } from 'path' |
5 | import { get, start } from 'prompt' | 4 | import { get, start } from 'prompt' |
6 | import { HLS_REDUNDANCY_DIRECTORY, HLS_STREAMING_PLAYLIST_DIRECTORY } from '@server/initializers/constants' | 5 | import { HLS_REDUNDANCY_DIRECTORY, HLS_STREAMING_PLAYLIST_DIRECTORY } from '@server/initializers/constants' |
7 | import { VideoFileModel } from '@server/models/video/video-file' | 6 | import { VideoFileModel } from '@server/models/video/video-file' |
8 | import { VideoStreamingPlaylistModel } from '@server/models/video/video-streaming-playlist' | 7 | import { VideoStreamingPlaylistModel } from '@server/models/video/video-streaming-playlist' |
8 | import { uniqify } from '@shared/core-utils' | ||
9 | import { ThumbnailType } from '@shared/models' | 9 | import { ThumbnailType } from '@shared/models' |
10 | import { getUUIDFromFilename } from '../server/helpers/utils' | 10 | import { getUUIDFromFilename } from '../server/helpers/utils' |
11 | import { CONFIG } from '../server/initializers/config' | 11 | import { CONFIG } from '../server/initializers/config' |
@@ -23,9 +23,9 @@ run() | |||
23 | }) | 23 | }) |
24 | 24 | ||
25 | async function run () { | 25 | async function run () { |
26 | const dirs = values(CONFIG.STORAGE) | 26 | const dirs = Object.values(CONFIG.STORAGE) |
27 | 27 | ||
28 | if (uniq(dirs).length !== dirs.length) { | 28 | if (uniqify(dirs).length !== dirs.length) { |
29 | console.error('Cannot prune storage because you put multiple storage keys in the same directory.') | 29 | console.error('Cannot prune storage because you put multiple storage keys in the same directory.') |
30 | process.exit(0) | 30 | process.exit(0) |
31 | } | 31 | } |