]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - scripts/prune-storage.ts
Use raw SQL for most of video queries
[github/Chocobozzz/PeerTube.git] / scripts / prune-storage.ts
index 0f2d1320e18a5ef13aca67cbc5be6ce932c64ead..58d24816e345e5e60c966c97999add985c31d63a 100755 (executable)
@@ -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())
   }