@@ -36,7 +36,7 @@ describe(`${AssetController.name} (e2e)`, () => {
36
36
await restoreTempFolder ( ) ;
37
37
} ) ;
38
38
39
- describe . only ( 'should strip metadata of' , ( ) => {
39
+ describe ( 'should strip metadata of' , ( ) => {
40
40
let assetWithLocation : AssetResponseDto ;
41
41
42
42
beforeEach ( async ( ) => {
@@ -84,4 +84,26 @@ describe(`${AssetController.name} (e2e)`, () => {
84
84
expect ( exifData ) . not . toHaveProperty ( 'GPSLatitude' ) ;
85
85
} ) ;
86
86
} ) ;
87
+
88
+ describe . each ( [
89
+ // These hashes were created by copying the image files to a Samsung phone,
90
+ // exporting the video from Samsung's stock Gallery app, and hashing them locally.
91
+ // This ensures that immich+exiftool are extracting the videos the same way Samsung does.
92
+ // DO NOT assume immich+exiftool are doing things correctly and just copy whatever hash it gives
93
+ // into the test here.
94
+ [ 'Samsung One UI 5.jpg' , 'fr14niqCq6N20HB8rJYEvpsUVtI=' ] ,
95
+ [ 'Samsung One UI 6.jpg' , 'lT9Uviw/FFJYCjfIxAGPTjzAmmw=' ] ,
96
+ [ 'Samsung One UI 6.heic' , '/ejgzywvgvzvVhUYVfvkLzFBAF0=' ] ,
97
+ ] ) ( 'should extract motionphoto video' , ( file , checksum ) => {
98
+ itif ( runAllTests ) ( `with checksum ${ checksum } from ${ file } ` , async ( ) => {
99
+ const fileContent = await fs . promises . readFile ( `${ IMMICH_TEST_ASSET_PATH } /formats/motionphoto/${ file } ` ) ;
100
+
101
+ const response = await api . assetApi . upload ( server , admin . accessToken , 'test-asset-id' , { content : fileContent } ) ;
102
+ const asset = await api . assetApi . get ( server , admin . accessToken , response . id ) ;
103
+ expect ( asset ) . toHaveProperty ( 'livePhotoVideoId' ) ;
104
+ const video = await api . assetApi . get ( server , admin . accessToken , asset . livePhotoVideoId as string ) ;
105
+
106
+ expect ( video . checksum ) . toStrictEqual ( checksum ) ;
107
+ } ) ;
108
+ } ) ;
87
109
} ) ;
0 commit comments