1
0
mirror of https://github.com/immich-app/immich.git synced 2024-11-21 18:16:55 +02:00

feat: Use video thumbnail for GIF types (#13677)

This commit is contained in:
Pranay Pandey 2024-10-22 22:34:44 +05:30 committed by GitHub
parent e98acc976e
commit d40cbe4c5f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -147,10 +147,10 @@ export class MediaService extends BaseService {
}
let generated: { previewPath: string; thumbnailPath: string; thumbhash: Buffer };
if (asset.type === AssetType.IMAGE) {
generated = await this.generateImageThumbnails(asset);
} else if (asset.type === AssetType.VIDEO) {
if (asset.type === AssetType.VIDEO || asset.originalFileName.toLowerCase().endsWith('.gif')) {
generated = await this.generateVideoThumbnails(asset);
} else if (asset.type === AssetType.IMAGE) {
generated = await this.generateImageThumbnails(asset);
} else {
this.logger.warn(`Skipping thumbnail generation for asset ${id}: ${asset.type} is not an image or video`);
return JobStatus.SKIPPED;