diff --git a/pkg/api/images.go b/pkg/api/images.go index 140478a7a..41f18c025 100644 --- a/pkg/api/images.go +++ b/pkg/api/images.go @@ -17,14 +17,31 @@ type imageBox struct { files []string } +var imageExtensions = []string{ + ".jpg", + ".jpeg", + ".png", + ".gif", + ".svg", + ".webp", +} + func newImageBox(box fs.FS) (*imageBox, error) { ret := &imageBox{ box: box, } err := fs.WalkDir(box, ".", func(path string, d fs.DirEntry, err error) error { - if !d.IsDir() { - ret.files = append(ret.files, path) + if d.IsDir() { + return nil + } + + baseName := strings.ToLower(d.Name()) + for _, ext := range imageExtensions { + if strings.HasSuffix(baseName, ext) { + ret.files = append(ret.files, path) + break + } } return nil diff --git a/ui/v2.5/src/components/Changelog/Changelog.tsx b/ui/v2.5/src/components/Changelog/Changelog.tsx index 423edf578..e7586d348 100644 --- a/ui/v2.5/src/components/Changelog/Changelog.tsx +++ b/ui/v2.5/src/components/Changelog/Changelog.tsx @@ -14,6 +14,7 @@ import V080 from "./versions/v080.md"; import V090 from "./versions/v090.md"; import V0100 from "./versions/v0100.md"; import V0110 from "./versions/v0110.md"; +import V0120 from "./versions/v0120.md"; import { MarkdownPage } from "../Shared/MarkdownPage"; // to avoid use of explicit any @@ -52,9 +53,9 @@ const Changelog: React.FC = () => { // after new release: // add entry to releases, using the current* fields // then update the current fields. - const currentVersion = stashVersion || "v0.11.0"; + const currentVersion = stashVersion || "v0.12.0"; const currentDate = buildDate; - const currentPage = V0110; + const currentPage = V0120; const releases: IStashRelease[] = [ { @@ -63,6 +64,11 @@ const Changelog: React.FC = () => { page: currentPage, defaultOpen: true, }, + { + version: "v0.11.0", + date: "2021-11-15", + page: V0110, + }, { version: "v0.10.0", date: "2021-10-11", diff --git a/ui/v2.5/src/components/Changelog/versions/v0120.md b/ui/v2.5/src/components/Changelog/versions/v0120.md new file mode 100644 index 000000000..aa248ac68 --- /dev/null +++ b/ui/v2.5/src/components/Changelog/versions/v0120.md @@ -0,0 +1,2 @@ +### 🐛 Bug fixes +* Fix "Custom Performer Images" feature picking up non-image files. ([#2017](https://github.com/stashapp/stash/pull/2017))