diff --git a/server/e2e/jobs/specs/library.e2e-spec.ts b/server/e2e/jobs/specs/library.e2e-spec.ts index a4ee4977a3..75411e8fac 100644 --- a/server/e2e/jobs/specs/library.e2e-spec.ts +++ b/server/e2e/jobs/specs/library.e2e-spec.ts @@ -61,11 +61,11 @@ describe(`${LibraryController.name} (e2e)`, () => { expect.arrayContaining([ expect.objectContaining({ isOffline: true, - originalFileName: 'el_torcal_rocks', + originalFileName: 'el_torcal_rocks.jpg', }), expect.objectContaining({ isOffline: true, - originalFileName: 'tanners_ridge', + originalFileName: 'tanners_ridge.jpg', }), ]), ); @@ -97,10 +97,10 @@ describe(`${LibraryController.name} (e2e)`, () => { expect(assets).toEqual( expect.arrayContaining([ expect.objectContaining({ - originalFileName: 'el_torcal_rocks', + originalFileName: 'el_torcal_rocks.jpg', }), expect.objectContaining({ - originalFileName: 'silver_fir', + originalFileName: 'silver_fir.jpg', }), ]), ); @@ -137,7 +137,7 @@ describe(`${LibraryController.name} (e2e)`, () => { expect(assets[0]).toEqual( expect.objectContaining({ - originalFileName: 'el_torcal_rocks', + originalFileName: 'el_torcal_rocks.jpg', exifInfo: expect.objectContaining({ dateTimeOriginal: '2023-09-25T08:33:30.880Z', exifImageHeight: 534, @@ -184,7 +184,7 @@ describe(`${LibraryController.name} (e2e)`, () => { expect(assets[0]).toEqual( expect.objectContaining({ - originalFileName: 'el_torcal_rocks', + originalFileName: 'el_torcal_rocks.jpg', exifInfo: expect.objectContaining({ dateTimeOriginal: '2012-08-05T11:39:59.000Z', }), @@ -224,7 +224,7 @@ describe(`${LibraryController.name} (e2e)`, () => { expect(assets[0]).toEqual( expect.objectContaining({ - originalFileName: 'el_torcal_rocks', + originalFileName: 'el_torcal_rocks.jpg', exifInfo: expect.objectContaining({ exifImageHeight: 534, exifImageWidth: 800, diff --git a/server/src/domain/library/library.service.spec.ts b/server/src/domain/library/library.service.spec.ts index 0c0daa165d..bd57a684d4 100644 --- a/server/src/domain/library/library.service.spec.ts +++ b/server/src/domain/library/library.service.spec.ts @@ -377,7 +377,7 @@ describe(LibraryService.name, () => { fileModifiedAt: expect.any(Date), localDateTime: expect.any(Date), type: AssetType.IMAGE, - originalFileName: 'photo', + originalFileName: 'photo.jpg', sidecarPath: null, isReadOnly: true, isExternal: true, @@ -425,7 +425,7 @@ describe(LibraryService.name, () => { fileModifiedAt: expect.any(Date), localDateTime: expect.any(Date), type: AssetType.IMAGE, - originalFileName: 'photo', + originalFileName: 'photo.jpg', sidecarPath: '/data/user1/photo.jpg.xmp', isReadOnly: true, isExternal: true, @@ -472,7 +472,7 @@ describe(LibraryService.name, () => { fileModifiedAt: expect.any(Date), localDateTime: expect.any(Date), type: AssetType.VIDEO, - originalFileName: 'video', + originalFileName: 'video.mp4', sidecarPath: null, isReadOnly: true, isExternal: true, diff --git a/server/src/domain/library/library.service.ts b/server/src/domain/library/library.service.ts index 3ef59c9190..00667539b1 100644 --- a/server/src/domain/library/library.service.ts +++ b/server/src/domain/library/library.service.ts @@ -511,7 +511,7 @@ export class LibraryService extends EventEmitter { fileModifiedAt: stats.mtime, localDateTime: stats.mtime, type: assetType, - originalFileName: parse(assetPath).name, + originalFileName: parse(assetPath).base, sidecarPath, isReadOnly: true, isExternal: true,