fix(server): extraction of Samsung Motionphoto videos (#6337)
* Fix extraction of samsung motionphoto videos * Refactor binary tag extraction to the repository to consolidate exiftool usage * format * fix linting and swap argument orders * Fix tag name and conditional order * Add unit test * Update server test assets submodule * Remove old motion photo video assets when a new one is extracted * delete first, then write * Include motion photo asset uuid's in the filename If the filenames are not uniquified, then we can't delete old/corrupt ones * Fix formatting and fix/add tests * chore: only use new uuid --------- Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
This commit is contained in:
Submodule server/test/assets updated: 948f353e3c...61131e84ec
2
server/test/fixtures/asset.stub.ts
vendored
2
server/test/fixtures/asset.stub.ts
vendored
@@ -401,7 +401,7 @@ export const assetStub = {
|
||||
}),
|
||||
|
||||
livePhotoMotionAsset: Object.freeze({
|
||||
id: 'live-photo-motion-asset',
|
||||
id: fileStub.livePhotoMotion.uuid,
|
||||
originalPath: fileStub.livePhotoMotion.originalPath,
|
||||
ownerId: authStub.user1.user.id,
|
||||
type: AssetType.VIDEO,
|
||||
|
||||
2
server/test/fixtures/file.stub.ts
vendored
2
server/test/fixtures/file.stub.ts
vendored
@@ -7,7 +7,7 @@ export const fileStub = {
|
||||
size: 42,
|
||||
}),
|
||||
livePhotoMotion: Object.freeze({
|
||||
uuid: 'random-uuid',
|
||||
uuid: 'live-photo-motion-asset',
|
||||
originalPath: 'fake_path/asset_1.mp4',
|
||||
checksum: Buffer.from('live photo file hash', 'utf8'),
|
||||
originalName: 'asset_1.mp4',
|
||||
|
||||
@@ -7,5 +7,6 @@ export const newMetadataRepositoryMock = (): jest.Mocked<IMetadataRepository> =>
|
||||
reverseGeocode: jest.fn(),
|
||||
readTags: jest.fn(),
|
||||
writeTags: jest.fn(),
|
||||
extractBinaryTag: jest.fn(),
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user