Add log in case of failure

This commit is contained in:
yannfrendo
2023-11-29 11:46:34 +01:00
parent 01e4f428b3
commit 5d4d04f5ae

View File

@@ -200,6 +200,10 @@ export class MetadataRepository implements IMetadataRepository {
}
async writeTags(path: string, tags: Partial<Tags>): Promise<void> {
await exiftool.write(path, tags, ['-overwrite_original']);
await exiftool.write(path, tags, ['-overwrite_original']).catch((error) => {
this.logger.warn(`Error writing exif data (${path}): ${error}`, error?.stack);
return null;
});
}
}