aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/prune-storage.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-02-16 08:50:40 +0100
committerChocobozzz <chocobozzz@cpy.re>2021-02-16 10:36:44 +0100
commita35a22797c99f17924347da9a226068c3dbe4787 (patch)
treeaffb713929145f90f6bda8828ded3ac2f4f73b19 /scripts/prune-storage.ts
parent6302d599cdf98b5a5363a2a1dcdc266447950191 (diff)
downloadPeerTube-a35a22797c99f17924347da9a226068c3dbe4787.tar.gz
PeerTube-a35a22797c99f17924347da9a226068c3dbe4787.tar.zst
PeerTube-a35a22797c99f17924347da9a226068c3dbe4787.zip
Remove previous thumbnail if needed
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 788d97997..dcb1fcf90 100755
--- a/scripts/prune-storage.ts
+++ b/scripts/prune-storage.ts
@@ -95,7 +95,7 @@ function doesVideoExist (keepOnlyOwned: boolean) {
95 95
96function doesThumbnailExist (keepOnlyOwned: boolean, type: ThumbnailType) { 96function doesThumbnailExist (keepOnlyOwned: boolean, type: ThumbnailType) {
97 return async (file: string) => { 97 return async (file: string) => {
98 const thumbnail = await ThumbnailModel.loadWithVideoByName(file, type) 98 const thumbnail = await ThumbnailModel.loadByFilename(file, type)
99 if (!thumbnail) return false 99 if (!thumbnail) return false
100 100
101 if (keepOnlyOwned) { 101 if (keepOnlyOwned) {