diff options
Diffstat (limited to 'scripts/prune-storage.ts')
-rwxr-xr-x | scripts/prune-storage.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/prune-storage.ts b/scripts/prune-storage.ts index 32314b0b7..58d24816e 100755 --- a/scripts/prune-storage.ts +++ b/scripts/prune-storage.ts | |||
@@ -11,7 +11,7 @@ import { VideoRedundancyModel } from '../server/models/redundancy/video-redundan | |||
11 | import * as Bluebird from 'bluebird' | 11 | import * as Bluebird from 'bluebird' |
12 | import { getUUIDFromFilename } from '../server/helpers/utils' | 12 | import { getUUIDFromFilename } from '../server/helpers/utils' |
13 | import { ThumbnailModel } from '../server/models/video/thumbnail' | 13 | import { ThumbnailModel } from '../server/models/video/thumbnail' |
14 | import { ActorImageModel } from '../server/models/account/actor-image' | 14 | import { ActorImageModel } from '../server/models/actor/actor-image' |
15 | import { uniq, values } from 'lodash' | 15 | import { uniq, values } from 'lodash' |
16 | import { ThumbnailType } from '@shared/models' | 16 | import { ThumbnailType } from '@shared/models' |
17 | 17 | ||
@@ -89,7 +89,7 @@ async function pruneDirectory (directory: string, existFun: ExistFun) { | |||
89 | function doesVideoExist (keepOnlyOwned: boolean) { | 89 | function doesVideoExist (keepOnlyOwned: boolean) { |
90 | return async (file: string) => { | 90 | return async (file: string) => { |
91 | const uuid = getUUIDFromFilename(file) | 91 | const uuid = getUUIDFromFilename(file) |
92 | const video = await VideoModel.loadByUUID(uuid) | 92 | const video = await VideoModel.load(uuid) |
93 | 93 | ||
94 | return video && (keepOnlyOwned === false || video.isOwned()) | 94 | return video && (keepOnlyOwned === false || video.isOwned()) |
95 | } | 95 | } |