mirror of
https://github.com/immich-app/immich.git
synced 2025-08-07 09:04:09 -04:00
fix: exif rating rounding (#20457)
* fix_Exlif_Metadata_Rating_Rounding_to_Interger Rounding Exlif Rating Interger Images support having numbers other than integers for the rating metadata in EXLIF. The database expects it to be an integer though. Trying to upload an image that has a rating other than an integer results in it failing to parse the image and defaulting to showing a corrupted file icon. Rather than changing the database type, I would like to round the rating to the nearest integer so that Immich works with images that have a rating like this in their metadata. * Changing Metadata validateRange to always round. * Update server/src/services/metadata.service.ts Co-authored-by: Daniel Dietzler <36593685+danieldietzler@users.noreply.github.com> --------- Co-authored-by: Daniel Dietzler <36593685+danieldietzler@users.noreply.github.com>
This commit is contained in:
parent
67736c8fce
commit
10141504a2
@ -101,7 +101,7 @@ const validateRange = (value: number | undefined, min: number, max: number): Non
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return val;
|
return Math.round(val);
|
||||||
};
|
};
|
||||||
|
|
||||||
const getLensModel = (exifTags: ImmichTags): string | null => {
|
const getLensModel = (exifTags: ImmichTags): string | null => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user