refactor: metadata extraction (#12359)

This commit is contained in:
Jason Rasmussen
2024-09-07 13:39:10 -04:00
committed by GitHub
parent 00a5da0ebc
commit a9caa407ec
6 changed files with 146 additions and 138 deletions
@@ -36,11 +36,11 @@ export class MetadataRepository implements IMetadataRepository {
await this.exiftool.end();
}
readTags(path: string): Promise<ImmichTags | null> {
readTags(path: string): Promise<ImmichTags> {
return this.exiftool.read(path).catch((error) => {
this.logger.warn(`Error reading exif data (${path}): ${error}`, error?.stack);
return null;
}) as Promise<ImmichTags | null>;
return {};
}) as Promise<ImmichTags>;
}
extractBinaryTag(path: string, tagName: string): Promise<Buffer> {