Import: Create thumbs for related JPEG files #602
This commit is contained in:
parent
28f59947df
commit
df3b125f27
1 changed files with 8 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
|||
package photoprism
|
||||
|
||||
import (
|
||||
"github.com/photoprism/photoprism/internal/query"
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
|
@ -167,6 +168,13 @@ func ImportWorker(jobs <-chan ImportJob) {
|
|||
|
||||
res := ind.MediaFile(f, indexOpt, "")
|
||||
|
||||
if res.Indexed() && f.IsJpeg() {
|
||||
if err := f.ResampleDefault(ind.thumbPath(), false); err != nil {
|
||||
log.Errorf("import: failed creating thumbnails for %s (%s)", txt.Quote(f.BaseName()), err.Error())
|
||||
query.SetFileError(res.FileUID, err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
log.Infof("import: %s related %s file %s", res, f.FileType(), txt.Quote(f.RelName(ind.originalsPath())))
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue