X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=scripts%2Fprune-storage.ts;h=58d24816e345e5e60c966c97999add985c31d63a;hb=5f8bd4cbb178290da7d8f81e996f19f0eccc8e4c;hp=0f2d1320e18a5ef13aca67cbc5be6ce932c64ead;hpb=819b656439e5f0ec2ae5de9357502cdfe3196197;p=github%2FChocobozzz%2FPeerTube.git diff --git a/scripts/prune-storage.ts b/scripts/prune-storage.ts index 0f2d1320e..58d24816e 100755 --- a/scripts/prune-storage.ts +++ b/scripts/prune-storage.ts @@ -89,7 +89,7 @@ async function pruneDirectory (directory: string, existFun: ExistFun) { function doesVideoExist (keepOnlyOwned: boolean) { return async (file: string) => { const uuid = getUUIDFromFilename(file) - const video = await VideoModel.loadByUUID(uuid) + const video = await VideoModel.load(uuid) return video && (keepOnlyOwned === false || video.isOwned()) }