diff options
Diffstat (limited to 'scripts/prune-storage.ts')
-rwxr-xr-x | scripts/prune-storage.ts | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/scripts/prune-storage.ts b/scripts/prune-storage.ts index 12d78fdc6..bb1e8e024 100755 --- a/scripts/prune-storage.ts +++ b/scripts/prune-storage.ts | |||
@@ -1,22 +1,19 @@ | |||
1 | import { registerTSPaths } from '../server/helpers/register-ts-paths' | ||
2 | registerTSPaths() | ||
3 | |||
4 | import { start, get } from 'prompt' | ||
5 | import { join, basename } from 'path' | ||
6 | import { CONFIG } from '../server/initializers/config' | ||
7 | import { VideoModel } from '../server/models/video/video' | ||
8 | import { initDatabaseModels } from '../server/initializers/database' | ||
9 | import { readdir, remove, stat } from 'fs-extra' | ||
10 | import { VideoRedundancyModel } from '../server/models/redundancy/video-redundancy' | ||
11 | import { map } from 'bluebird' | 1 | import { map } from 'bluebird' |
12 | import { getUUIDFromFilename } from '../server/helpers/utils' | 2 | import { readdir, remove, stat } from 'fs-extra' |
13 | import { ThumbnailModel } from '../server/models/video/thumbnail' | ||
14 | import { ActorImageModel } from '../server/models/actor/actor-image' | ||
15 | import { uniq, values } from 'lodash' | 3 | import { uniq, values } from 'lodash' |
16 | import { ThumbnailType } from '@shared/models' | 4 | import { basename, join } from 'path' |
17 | import { VideoFileModel } from '@server/models/video/video-file' | 5 | import { get, start } from 'prompt' |
18 | import { HLS_REDUNDANCY_DIRECTORY, HLS_STREAMING_PLAYLIST_DIRECTORY } from '@server/initializers/constants' | 6 | import { HLS_REDUNDANCY_DIRECTORY, HLS_STREAMING_PLAYLIST_DIRECTORY } from '@server/initializers/constants' |
7 | import { VideoFileModel } from '@server/models/video/video-file' | ||
19 | import { VideoStreamingPlaylistModel } from '@server/models/video/video-streaming-playlist' | 8 | import { VideoStreamingPlaylistModel } from '@server/models/video/video-streaming-playlist' |
9 | import { ThumbnailType } from '@shared/models' | ||
10 | import { getUUIDFromFilename } from '../server/helpers/utils' | ||
11 | import { CONFIG } from '../server/initializers/config' | ||
12 | import { initDatabaseModels } from '../server/initializers/database' | ||
13 | import { ActorImageModel } from '../server/models/actor/actor-image' | ||
14 | import { VideoRedundancyModel } from '../server/models/redundancy/video-redundancy' | ||
15 | import { ThumbnailModel } from '../server/models/video/thumbnail' | ||
16 | import { VideoModel } from '../server/models/video/video' | ||
20 | 17 | ||
21 | run() | 18 | run() |
22 | .then(() => process.exit(0)) | 19 | .then(() => process.exit(0)) |