Import: Extract metadata with ExifTool before moving #810

This commit is contained in:
Michael Mayer 2021-01-04 20:07:24 +01:00
parent a89965a273
commit 40d734d073

View file

@ -34,6 +34,16 @@ func ImportWorker(jobs <-chan ImportJob) {
continue
}
if related.Main.NeedsExifToolJson() {
if jsonName, err := imp.convert.ToJson(related.Main); err != nil {
log.Errorf("import: %s in %s (extract metadata)", txt.Quote(err.Error()), txt.Quote(related.Main.BaseName()))
} else if err := related.Main.ReadExifToolJson(); err != nil {
log.Errorf("import: %s in %s (read metadata)", txt.Quote(err.Error()), txt.Quote(related.Main.BaseName()))
} else {
log.Debugf("import: %s created", filepath.Base(jsonName))
}
}
originalName := related.Main.RelName(importPath)
event.Publish("import.file", event.Data{