mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 20:34:37 +03:00
Don't generate thumbnails for webp (#2388)
* Don't generate thumbnails for animated webp * Debug log when writing thumbnail to disk
This commit is contained in:
@@ -3,6 +3,7 @@ package manager
|
||||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"errors"
|
||||
"path/filepath"
|
||||
"time"
|
||||
|
||||
@@ -155,7 +156,10 @@ func (t *ScanTask) generateThumbnail(i *models.Image) {
|
||||
data, err := encoder.GetThumbnail(i, models.DefaultGthumbWidth)
|
||||
|
||||
if err != nil {
|
||||
logger.Errorf("error getting thumbnail for image %s: %s", i.Path, err.Error())
|
||||
// don't log for animated images
|
||||
if !errors.Is(err, image.ErrNotSupportedForThumbnail) {
|
||||
logger.Errorf("error getting thumbnail for image %s: %s", i.Path, err.Error())
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user