aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/prune-storage.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-06-11 14:09:33 +0200
committerChocobozzz <me@florianbigard.com>2021-06-11 14:09:52 +0200
commit71d4af1efc810f853e1a0d986bf758c201692594 (patch)
tree2066053638baefb6430772c2e0a0aa1774019a51 /scripts/prune-storage.ts
parent3c79c2ce86eaf9e151ab6c2c9d1f646968a16744 (diff)
downloadPeerTube-71d4af1efc810f853e1a0d986bf758c201692594.tar.gz
PeerTube-71d4af1efc810f853e1a0d986bf758c201692594.tar.zst
PeerTube-71d4af1efc810f853e1a0d986bf758c201692594.zip
Use raw SQL for most of video queries
Diffstat (limited to 'scripts/prune-storage.ts')
-rwxr-xr-xscripts/prune-storage.ts2
1 files changed, 1 insertions, 1 deletions
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) {
89function doesVideoExist (keepOnlyOwned: boolean) { 89function 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 }