mirror of
https://github.com/immich-app/immich.git
synced 2025-05-24 01:12:58 -04:00
fix: no thumbnail generated for motion assets (#17472)
This commit is contained in:
parent
4794eeca88
commit
ae8af84101
@ -546,7 +546,7 @@ describe(MetadataService.name, () => {
|
||||
id: assetStub.livePhotoWithOriginalFileName.id,
|
||||
livePhotoVideoId: fileStub.livePhotoMotion.uuid,
|
||||
});
|
||||
expect(mocks.asset.update).toHaveBeenCalledTimes(2);
|
||||
expect(mocks.asset.update).toHaveBeenCalledTimes(3);
|
||||
});
|
||||
|
||||
it('should extract the EmbeddedVideo tag from Samsung JPEG motion photos', async () => {
|
||||
@ -598,7 +598,7 @@ describe(MetadataService.name, () => {
|
||||
id: assetStub.livePhotoWithOriginalFileName.id,
|
||||
livePhotoVideoId: fileStub.livePhotoMotion.uuid,
|
||||
});
|
||||
expect(mocks.asset.update).toHaveBeenCalledTimes(2);
|
||||
expect(mocks.asset.update).toHaveBeenCalledTimes(3);
|
||||
});
|
||||
|
||||
it('should extract the motion photo video from the XMP directory entry ', async () => {
|
||||
@ -650,7 +650,7 @@ describe(MetadataService.name, () => {
|
||||
id: assetStub.livePhotoWithOriginalFileName.id,
|
||||
livePhotoVideoId: fileStub.livePhotoMotion.uuid,
|
||||
});
|
||||
expect(mocks.asset.update).toHaveBeenCalledTimes(2);
|
||||
expect(mocks.asset.update).toHaveBeenCalledTimes(3);
|
||||
});
|
||||
|
||||
it('should delete old motion photo video assets if they do not match what is extracted', async () => {
|
||||
@ -673,10 +673,6 @@ describe(MetadataService.name, () => {
|
||||
name: JobName.ASSET_DELETION,
|
||||
data: { id: assetStub.livePhotoWithOriginalFileName.livePhotoVideoId, deleteOnDisk: true },
|
||||
});
|
||||
expect(mocks.job.queue).toHaveBeenNthCalledWith(2, {
|
||||
name: JobName.METADATA_EXTRACTION,
|
||||
data: { id: 'random-uuid' },
|
||||
});
|
||||
});
|
||||
|
||||
it('should not create a new motion photo video asset if the hash of the extracted video matches an existing asset', async () => {
|
||||
@ -723,7 +719,7 @@ describe(MetadataService.name, () => {
|
||||
id: assetStub.livePhotoStillAsset.id,
|
||||
livePhotoVideoId: assetStub.livePhotoMotionAsset.id,
|
||||
});
|
||||
expect(mocks.asset.update).toHaveBeenCalledTimes(3);
|
||||
expect(mocks.asset.update).toHaveBeenCalledTimes(4);
|
||||
});
|
||||
|
||||
it('should not update storage usage if motion photo is external', async () => {
|
||||
|
@ -550,7 +550,8 @@ export class MetadataService extends BaseService {
|
||||
this.storageCore.ensureFolders(motionAsset.originalPath);
|
||||
await this.storageRepository.createFile(motionAsset.originalPath, video);
|
||||
this.logger.log(`Wrote motion photo video to ${motionAsset.originalPath}`);
|
||||
await this.jobRepository.queue({ name: JobName.METADATA_EXTRACTION, data: { id: motionAsset.id } });
|
||||
|
||||
await this.handleMetadataExtraction({ id: motionAsset.id });
|
||||
}
|
||||
|
||||
this.logger.debug(`Finished motion photo video extraction for asset ${asset.id}: ${asset.originalPath}`);
|
||||
|
Loading…
x
Reference in New Issue
Block a user