X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=scripts%2Fprune-storage.ts;h=58d24816e345e5e60c966c97999add985c31d63a;hb=0ca454e3bdf89390d1a48760ab555ddd8725c82d;hp=0f2d1320e18a5ef13aca67cbc5be6ce932c64ead;hpb=8ee37c5f38b0f9b7e97239197d5590109c163250;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()) }