diff --git a/conf/configuration.go b/conf/configuration.go index 703467a9a..34c1d0377 100644 --- a/conf/configuration.go +++ b/conf/configuration.go @@ -34,6 +34,7 @@ type nd struct { ProbeCommand string `default:"ffmpeg %s -f ffmetadata"` CoverArtPriority string `default:"embedded, cover.*, folder.*, front.*"` + CoverJpegQuality int `default:"75"` // DevFlags. These are used to enable/disable debugging and incomplete features DevLogSourceLine bool `default:"false"` diff --git a/engine/cover.go b/engine/cover.go index 180da8e8b..53f010d62 100644 --- a/engine/cover.go +++ b/engine/cover.go @@ -163,7 +163,7 @@ func resizeImage(reader io.Reader, size int) ([]byte, error) { } m := imaging.Resize(img, size, size, imaging.Lanczos) buf := new(bytes.Buffer) - err = jpeg.Encode(buf, m, &jpeg.Options{Quality: 75}) + err = jpeg.Encode(buf, m, &jpeg.Options{Quality: conf.Server.CoverJpegQuality}) return buf.Bytes(), err }