mirror of
https://github.com/KevinMidboe/immich.git
synced 2026-01-07 01:35:49 +00:00
fix(server): handle NaN in metadata extraction (#4221)
Fallback to null in event of invalid number.
This commit is contained in:
@@ -74,7 +74,7 @@ export class MetadataRepository implements IMetadataRepository {
|
||||
|
||||
getExifTags(path: string): Promise<ImmichTags | null> {
|
||||
return exiftool
|
||||
.read<ImmichTags>(path, undefined, {
|
||||
.read(path, undefined, {
|
||||
...DefaultReadTaskOptions,
|
||||
|
||||
defaultVideosToUTC: true,
|
||||
@@ -87,6 +87,6 @@ export class MetadataRepository implements IMetadataRepository {
|
||||
.catch((error) => {
|
||||
this.logger.warn(`Error reading exif data (${path}): ${error}`, error?.stack);
|
||||
return null;
|
||||
});
|
||||
}) as Promise<ImmichTags | null>;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user