aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/thumbnail.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-02-15 14:08:16 +0100
committerChocobozzz <chocobozzz@cpy.re>2021-02-16 10:36:44 +0100
commit6302d599cdf98b5a5363a2a1dcdc266447950191 (patch)
treeb7dc6dc0f08f0fb8a20720242c9c0a71afeeaa3f /server/lib/thumbnail.ts
parenta8b1b40485145ac1eae513a661d7dd6e0986ce96 (diff)
downloadPeerTube-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.ts3
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