diff options
author | Chocobozzz <me@florianbigard.com> | 2021-11-10 15:13:56 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-11-10 15:13:56 +0100 |
commit | 17ddba4950d72e07968a3e87e9ea68b7c61f5b97 (patch) | |
tree | 186f1c954880ac4ba9ae45c6faa3ec53ab69a91c /server/models/video | |
parent | a2a81f5a7fe902245d9273530bbd65f522b2edfa (diff) | |
download | PeerTube-17ddba4950d72e07968a3e87e9ea68b7c61f5b97.tar.gz PeerTube-17ddba4950d72e07968a3e87e9ea68b7c61f5b97.tar.zst PeerTube-17ddba4950d72e07968a3e87e9ea68b7c61f5b97.zip |
Fix thumbnail update
Diffstat (limited to 'server/models/video')
-rw-r--r-- | server/models/video/video.ts | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/server/models/video/video.ts b/server/models/video/video.ts index 3eed1b58d..ba4cf541b 100644 --- a/server/models/video/video.ts +++ b/server/models/video/video.ts | |||
@@ -1576,9 +1576,7 @@ export class VideoModel extends Model<Partial<AttributesOnly<VideoModel>>> { | |||
1576 | 1576 | ||
1577 | if (Array.isArray(this.Thumbnails) === false) this.Thumbnails = [] | 1577 | if (Array.isArray(this.Thumbnails) === false) this.Thumbnails = [] |
1578 | 1578 | ||
1579 | // Already have this thumbnail, skip | 1579 | this.Thumbnails = this.Thumbnails.filter(t => t.id !== savedThumbnail.id) |
1580 | if (this.Thumbnails.find(t => t.id === savedThumbnail.id)) return | ||
1581 | |||
1582 | this.Thumbnails.push(savedThumbnail) | 1580 | this.Thumbnails.push(savedThumbnail) |
1583 | } | 1581 | } |
1584 | 1582 | ||