mirror of
https://github.com/immich-app/immich.git
synced 2026-02-14 04:47:57 +03:00
Merge branch 'main' of https://github.com/immich-app/immich into fix/modal-sticky-bottom
This commit is contained in:
@@ -1095,6 +1095,18 @@ describe(MetadataService.name, () => {
|
||||
expect(personMock.updateAll).toHaveBeenCalledWith([]);
|
||||
expect(jobMock.queueAll).toHaveBeenCalledWith([]);
|
||||
});
|
||||
|
||||
it('should handle invalid modify date', async () => {
|
||||
assetMock.getByIds.mockResolvedValue([assetStub.image]);
|
||||
metadataMock.readTags.mockResolvedValue({ ModifyDate: '00:00:00.000' });
|
||||
|
||||
await sut.handleMetadataExtraction({ id: assetStub.image.id });
|
||||
expect(assetMock.upsertExif).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
modifyDate: expect.any(Date),
|
||||
}),
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe('handleQueueSidecar', () => {
|
||||
|
||||
@@ -629,11 +629,16 @@ export class MetadataService {
|
||||
this.logger.debug(`Asset ${asset.id} local time is offset by ${offsetMinutes} minutes`);
|
||||
}
|
||||
|
||||
let modifyDate = asset.fileModifiedAt;
|
||||
try {
|
||||
modifyDate = (exifTags.ModifyDate as ExifDateTime)?.toDate() ?? modifyDate;
|
||||
} catch {}
|
||||
|
||||
return {
|
||||
dateTimeOriginal,
|
||||
timeZone,
|
||||
localDateTime,
|
||||
modifyDate: (exifTags.ModifyDate as ExifDateTime)?.toDate() ?? asset.fileModifiedAt,
|
||||
modifyDate,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
aria-modal="true"
|
||||
aria-labelledby={titleId}
|
||||
>
|
||||
<div class="immich-scrollbar overflow-y-auto max-h-[min(85dvh,44rem)]">
|
||||
<div class="immich-scrollbar overflow-y-auto max-h-[min(85dvh,44rem)] py-1">
|
||||
<ModalHeader id={titleId} {title} {showLogo} {icon} {onClose} />
|
||||
<div class="px-5 pt-0" class:pb-5={isStickyBottom}>
|
||||
<slot />
|
||||
|
||||
Reference in New Issue
Block a user