mirror of
				https://github.com/immich-app/immich.git
				synced 2025-11-02 18:59:15 -05:00 
			
		
		
		
	fix(server): use extension in originalFileName for libraries (#8083)
* use file base * fix: test * fix: e2e-job tests --------- Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
		
							parent
							
								
									f908bd4a64
								
							
						
					
					
						commit
						e6f2bb9f89
					
				@ -61,11 +61,11 @@ describe(`${LibraryController.name} (e2e)`, () => {
 | 
				
			|||||||
        expect.arrayContaining([
 | 
					        expect.arrayContaining([
 | 
				
			||||||
          expect.objectContaining({
 | 
					          expect.objectContaining({
 | 
				
			||||||
            isOffline: true,
 | 
					            isOffline: true,
 | 
				
			||||||
            originalFileName: 'el_torcal_rocks',
 | 
					            originalFileName: 'el_torcal_rocks.jpg',
 | 
				
			||||||
          }),
 | 
					          }),
 | 
				
			||||||
          expect.objectContaining({
 | 
					          expect.objectContaining({
 | 
				
			||||||
            isOffline: true,
 | 
					            isOffline: true,
 | 
				
			||||||
            originalFileName: 'tanners_ridge',
 | 
					            originalFileName: 'tanners_ridge.jpg',
 | 
				
			||||||
          }),
 | 
					          }),
 | 
				
			||||||
        ]),
 | 
					        ]),
 | 
				
			||||||
      );
 | 
					      );
 | 
				
			||||||
@ -97,10 +97,10 @@ describe(`${LibraryController.name} (e2e)`, () => {
 | 
				
			|||||||
      expect(assets).toEqual(
 | 
					      expect(assets).toEqual(
 | 
				
			||||||
        expect.arrayContaining([
 | 
					        expect.arrayContaining([
 | 
				
			||||||
          expect.objectContaining({
 | 
					          expect.objectContaining({
 | 
				
			||||||
            originalFileName: 'el_torcal_rocks',
 | 
					            originalFileName: 'el_torcal_rocks.jpg',
 | 
				
			||||||
          }),
 | 
					          }),
 | 
				
			||||||
          expect.objectContaining({
 | 
					          expect.objectContaining({
 | 
				
			||||||
            originalFileName: 'silver_fir',
 | 
					            originalFileName: 'silver_fir.jpg',
 | 
				
			||||||
          }),
 | 
					          }),
 | 
				
			||||||
        ]),
 | 
					        ]),
 | 
				
			||||||
      );
 | 
					      );
 | 
				
			||||||
@ -137,7 +137,7 @@ describe(`${LibraryController.name} (e2e)`, () => {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        expect(assets[0]).toEqual(
 | 
					        expect(assets[0]).toEqual(
 | 
				
			||||||
          expect.objectContaining({
 | 
					          expect.objectContaining({
 | 
				
			||||||
            originalFileName: 'el_torcal_rocks',
 | 
					            originalFileName: 'el_torcal_rocks.jpg',
 | 
				
			||||||
            exifInfo: expect.objectContaining({
 | 
					            exifInfo: expect.objectContaining({
 | 
				
			||||||
              dateTimeOriginal: '2023-09-25T08:33:30.880Z',
 | 
					              dateTimeOriginal: '2023-09-25T08:33:30.880Z',
 | 
				
			||||||
              exifImageHeight: 534,
 | 
					              exifImageHeight: 534,
 | 
				
			||||||
@ -184,7 +184,7 @@ describe(`${LibraryController.name} (e2e)`, () => {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        expect(assets[0]).toEqual(
 | 
					        expect(assets[0]).toEqual(
 | 
				
			||||||
          expect.objectContaining({
 | 
					          expect.objectContaining({
 | 
				
			||||||
            originalFileName: 'el_torcal_rocks',
 | 
					            originalFileName: 'el_torcal_rocks.jpg',
 | 
				
			||||||
            exifInfo: expect.objectContaining({
 | 
					            exifInfo: expect.objectContaining({
 | 
				
			||||||
              dateTimeOriginal: '2012-08-05T11:39:59.000Z',
 | 
					              dateTimeOriginal: '2012-08-05T11:39:59.000Z',
 | 
				
			||||||
            }),
 | 
					            }),
 | 
				
			||||||
@ -224,7 +224,7 @@ describe(`${LibraryController.name} (e2e)`, () => {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        expect(assets[0]).toEqual(
 | 
					        expect(assets[0]).toEqual(
 | 
				
			||||||
          expect.objectContaining({
 | 
					          expect.objectContaining({
 | 
				
			||||||
            originalFileName: 'el_torcal_rocks',
 | 
					            originalFileName: 'el_torcal_rocks.jpg',
 | 
				
			||||||
            exifInfo: expect.objectContaining({
 | 
					            exifInfo: expect.objectContaining({
 | 
				
			||||||
              exifImageHeight: 534,
 | 
					              exifImageHeight: 534,
 | 
				
			||||||
              exifImageWidth: 800,
 | 
					              exifImageWidth: 800,
 | 
				
			||||||
 | 
				
			|||||||
@ -377,7 +377,7 @@ describe(LibraryService.name, () => {
 | 
				
			|||||||
            fileModifiedAt: expect.any(Date),
 | 
					            fileModifiedAt: expect.any(Date),
 | 
				
			||||||
            localDateTime: expect.any(Date),
 | 
					            localDateTime: expect.any(Date),
 | 
				
			||||||
            type: AssetType.IMAGE,
 | 
					            type: AssetType.IMAGE,
 | 
				
			||||||
            originalFileName: 'photo',
 | 
					            originalFileName: 'photo.jpg',
 | 
				
			||||||
            sidecarPath: null,
 | 
					            sidecarPath: null,
 | 
				
			||||||
            isReadOnly: true,
 | 
					            isReadOnly: true,
 | 
				
			||||||
            isExternal: true,
 | 
					            isExternal: true,
 | 
				
			||||||
@ -425,7 +425,7 @@ describe(LibraryService.name, () => {
 | 
				
			|||||||
            fileModifiedAt: expect.any(Date),
 | 
					            fileModifiedAt: expect.any(Date),
 | 
				
			||||||
            localDateTime: expect.any(Date),
 | 
					            localDateTime: expect.any(Date),
 | 
				
			||||||
            type: AssetType.IMAGE,
 | 
					            type: AssetType.IMAGE,
 | 
				
			||||||
            originalFileName: 'photo',
 | 
					            originalFileName: 'photo.jpg',
 | 
				
			||||||
            sidecarPath: '/data/user1/photo.jpg.xmp',
 | 
					            sidecarPath: '/data/user1/photo.jpg.xmp',
 | 
				
			||||||
            isReadOnly: true,
 | 
					            isReadOnly: true,
 | 
				
			||||||
            isExternal: true,
 | 
					            isExternal: true,
 | 
				
			||||||
@ -472,7 +472,7 @@ describe(LibraryService.name, () => {
 | 
				
			|||||||
            fileModifiedAt: expect.any(Date),
 | 
					            fileModifiedAt: expect.any(Date),
 | 
				
			||||||
            localDateTime: expect.any(Date),
 | 
					            localDateTime: expect.any(Date),
 | 
				
			||||||
            type: AssetType.VIDEO,
 | 
					            type: AssetType.VIDEO,
 | 
				
			||||||
            originalFileName: 'video',
 | 
					            originalFileName: 'video.mp4',
 | 
				
			||||||
            sidecarPath: null,
 | 
					            sidecarPath: null,
 | 
				
			||||||
            isReadOnly: true,
 | 
					            isReadOnly: true,
 | 
				
			||||||
            isExternal: true,
 | 
					            isExternal: true,
 | 
				
			||||||
 | 
				
			|||||||
@ -511,7 +511,7 @@ export class LibraryService extends EventEmitter {
 | 
				
			|||||||
        fileModifiedAt: stats.mtime,
 | 
					        fileModifiedAt: stats.mtime,
 | 
				
			||||||
        localDateTime: stats.mtime,
 | 
					        localDateTime: stats.mtime,
 | 
				
			||||||
        type: assetType,
 | 
					        type: assetType,
 | 
				
			||||||
        originalFileName: parse(assetPath).name,
 | 
					        originalFileName: parse(assetPath).base,
 | 
				
			||||||
        sidecarPath,
 | 
					        sidecarPath,
 | 
				
			||||||
        isReadOnly: true,
 | 
					        isReadOnly: true,
 | 
				
			||||||
        isExternal: true,
 | 
					        isExternal: true,
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user