Backend: Re-render thumbs after files changed #299

Signed-off-by: Michael Mayer <michael@liquidbytes.net>
This commit is contained in:
Michael Mayer 2020-05-10 20:10:17 +02:00
parent 4f8b4d58a2
commit 561323d544

View file

@ -37,7 +37,7 @@ func IndexWorker(jobs <-chan IndexJob) {
res := ind.MediaFile(f, opt, "")
done[f.FileName()] = true
if res.Status == IndexAdded && f.IsJpeg() {
if (res.Status == IndexAdded || res.Status == IndexUpdated) && f.IsJpeg() {
if err := f.ResampleDefault(ind.thumbPath(), false); err != nil {
log.Errorf("index: could not create default thumbnails (%s)", err.Error())
}
@ -56,7 +56,7 @@ func IndexWorker(jobs <-chan IndexJob) {
res := ind.MediaFile(f, opt, "")
done[f.FileName()] = true
if res.Status == IndexAdded && f.IsJpeg() {
if (res.Status == IndexAdded || res.Status == IndexUpdated) && f.IsJpeg() {
if err := f.ResampleDefault(ind.thumbPath(), false); err != nil {
log.Errorf("index: could not create default thumbnails (%s)", err.Error())
}