diff options
author | Chocobozzz <me@florianbigard.com> | 2021-02-16 08:50:40 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2021-02-16 10:36:44 +0100 |
commit | a35a22797c99f17924347da9a226068c3dbe4787 (patch) | |
tree | affb713929145f90f6bda8828ded3ac2f4f73b19 /scripts | |
parent | 6302d599cdf98b5a5363a2a1dcdc266447950191 (diff) | |
download | PeerTube-a35a22797c99f17924347da9a226068c3dbe4787.tar.gz PeerTube-a35a22797c99f17924347da9a226068c3dbe4787.tar.zst PeerTube-a35a22797c99f17924347da9a226068c3dbe4787.zip |
Remove previous thumbnail if needed
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/prune-storage.ts | 2 |
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 | ||
96 | function doesThumbnailExist (keepOnlyOwned: boolean, type: ThumbnailType) { | 96 | function 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) { |