Fixed length of extensions array, and added bmp to the support formats in the readme
This commit is contained in:
parent
7e5f8b4c14
commit
c13eac975f
|
@ -8,7 +8,7 @@ A new image will be selected if you open `/` directly, or if you click on any di
|
||||||
|
|
||||||
Browser history is preserved, so you can always go back to any previously displayed image.
|
Browser history is preserved, so you can always go back to any previously displayed image.
|
||||||
|
|
||||||
Supported file types and extensions are `jp[e]g`, `png`, `gif`, and `webp`.
|
Supported file types and extensions are `bmp`, `gif`, `jp[e]g`, `png`, and `webp`.
|
||||||
|
|
||||||
Builds available [here](https://cdn.seedno.de/builds/roulette).
|
Builds available [here](https://cdn.seedno.de/builds/roulette).
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ import (
|
||||||
|
|
||||||
var (
|
var (
|
||||||
ErrNoImagesFound = fmt.Errorf("no supported image formats found")
|
ErrNoImagesFound = fmt.Errorf("no supported image formats found")
|
||||||
extensions = [7]string{".jpg", ".jpeg", ".png", ".gif", ".webp", ".bmp"}
|
extensions = [6]string{".jpg", ".jpeg", ".png", ".gif", ".webp", ".bmp"}
|
||||||
)
|
)
|
||||||
|
|
||||||
type Files struct {
|
type Files struct {
|
||||||
|
@ -128,7 +128,7 @@ func preparePath(path string) string {
|
||||||
}
|
}
|
||||||
|
|
||||||
func appendPath(directory, path string, files *Files, stats *Stats) error {
|
func appendPath(directory, path string, files *Files, stats *Stats) error {
|
||||||
// If caching, check for valid images here, to speed up future pickFile() calls
|
// If caching, only check image types once, during the initial scan, to speed up future pickFile() calls
|
||||||
if Cache {
|
if Cache {
|
||||||
image, err := isImage(path)
|
image, err := isImage(path)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -10,7 +10,7 @@ import (
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
var Version = "0.20.9"
|
var Version = "0.20.10"
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
rootCmd.AddCommand(versionCmd)
|
rootCmd.AddCommand(versionCmd)
|
||||||
|
|
Loading…
Reference in New Issue