Treat images with no exif metadata as well-oriented (#6006)

This commit is contained in:
Otter Bot Society 2025-09-08 23:48:16 -07:00 committed by GitHub
parent cc97e96eaa
commit 12c4e1f61c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -4,6 +4,7 @@ import (
"errors" "errors"
"fmt" "fmt"
"io" "io"
"strings"
"github.com/rwcarlsen/goexif/exif" "github.com/rwcarlsen/goexif/exif"
"github.com/stashapp/stash/pkg/logger" "github.com/stashapp/stash/pkg/logger"
@ -33,7 +34,7 @@ func areDimensionsFlipped(fs models.FS, path string) (bool, error) {
x, err := exif.Decode(r) x, err := exif.Decode(r)
if err != nil { if err != nil {
if errors.Is(err, io.EOF) { if errors.Is(err, io.EOF) || strings.Contains(err.Error(), "failed to find exif") {
// no exif data // no exif data
return false, nil return false, nil
} }