diff options
author | Chocobozzz <me@florianbigard.com> | 2021-02-15 14:08:16 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2021-02-16 10:36:44 +0100 |
commit | 6302d599cdf98b5a5363a2a1dcdc266447950191 (patch) | |
tree | b7dc6dc0f08f0fb8a20720242c9c0a71afeeaa3f /server/lib/thumbnail.ts | |
parent | a8b1b40485145ac1eae513a661d7dd6e0986ce96 (diff) | |
download | PeerTube-6302d599cdf98b5a5363a2a1dcdc266447950191.tar.gz PeerTube-6302d599cdf98b5a5363a2a1dcdc266447950191.tar.zst PeerTube-6302d599cdf98b5a5363a2a1dcdc266447950191.zip |
Generate a name for caption files
Diffstat (limited to 'server/lib/thumbnail.ts')
-rw-r--r-- | server/lib/thumbnail.ts | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/server/lib/thumbnail.ts b/server/lib/thumbnail.ts index 740b83acb..33aa7159c 100644 --- a/server/lib/thumbnail.ts +++ b/server/lib/thumbnail.ts | |||
@@ -166,6 +166,9 @@ async function createThumbnailFromFunction (parameters: { | |||
166 | }) { | 166 | }) { |
167 | const { thumbnailCreator, filename, width, height, type, existingThumbnail, automaticallyGenerated = null, fileUrl = null } = parameters | 167 | const { thumbnailCreator, filename, width, height, type, existingThumbnail, automaticallyGenerated = null, fileUrl = null } = parameters |
168 | 168 | ||
169 | // Remove old file | ||
170 | if (existingThumbnail) await existingThumbnail.removeThumbnail() | ||
171 | |||
169 | const thumbnail = existingThumbnail || new ThumbnailModel() | 172 | const thumbnail = existingThumbnail || new ThumbnailModel() |
170 | 173 | ||
171 | thumbnail.filename = filename | 174 | thumbnail.filename = filename |