Import: Extract metadata with ExifTool before moving #810
This commit is contained in:
parent
a89965a273
commit
40d734d073
1 changed files with 10 additions and 0 deletions
|
@ -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{
|
||||
|
|
Loading…
Reference in a new issue