From 220019a9f196bb146d1c8df407944afe2be709ff Mon Sep 17 00:00:00 2001 From: Deluan Date: Wed, 1 Apr 2026 18:19:06 -0400 Subject: [PATCH] fix: add missing viper defaults for mpvpath, artistimagefolder, and plugins.loglevel Fix #5284 Several configOptions struct fields were missing corresponding viper.SetDefault entries, making them invisible to environment variable overrides and config file parsing. Added defaults for mpvpath (consistent with ffmpegpath), artistimagefolder, and plugins.loglevel. Signed-off-by: Deluan --- conf/configuration.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/conf/configuration.go b/conf/configuration.go index 653e3d8e1..fce5e0b2f 100644 --- a/conf/configuration.go +++ b/conf/configuration.go @@ -712,10 +712,12 @@ func setViperDefaults() { viper.SetDefault("ignoredarticles", "The El La Los Las Le Les Os As O A") viper.SetDefault("indexgroups", "A B C D E F G H I J K L M N O P Q R S T U V W X-Z(XYZ) [Unknown]([)") viper.SetDefault("ffmpegpath", "") + viper.SetDefault("mpvpath", "") viper.SetDefault("mpvcmdtemplate", "mpv --audio-device=%d --no-audio-display %f --input-ipc-server=%s") viper.SetDefault("coverartpriority", "cover.*, folder.*, front.*, embedded, external") viper.SetDefault("coverartquality", 75) viper.SetDefault("artistartpriority", "artist.*, album/artist.*, external") + viper.SetDefault("artistimagefolder", "") viper.SetDefault("discartpriority", "disc*.*, cd*.*, cover.*, folder.*, front.*, discsubtitle, embedded") viper.SetDefault("lyricspriority", ".lrc,.txt,embedded") viper.SetDefault("enablegravatar", false) @@ -794,6 +796,7 @@ func setViperDefaults() { viper.SetDefault("plugins.enabled", true) viper.SetDefault("plugins.cachesize", "200MB") viper.SetDefault("plugins.autoreload", false) + viper.SetDefault("plugins.loglevel", "") // DevFlags. These are used to enable/disable debugging and incomplete features viper.SetDefault("devlogsourceline", false)