diff --git a/pkg/manager/config/config.go b/pkg/manager/config/config.go index b3c76b532..1482e4982 100644 --- a/pkg/manager/config/config.go +++ b/pkg/manager/config/config.go @@ -124,13 +124,14 @@ const ( WallShowTitle = "wall_show_title" defaultWallShowTitle = true - CustomPerformerImageLocation = "custom_performer_image_location" - MaximumLoopDuration = "maximum_loop_duration" - AutostartVideo = "autostart_video" - AutostartVideoOnPlaySelected = "autostart_video_on_play_selected" - ContinuePlaylistDefault = "continue_playlist_default" - ShowStudioAsText = "show_studio_as_text" - CSSEnabled = "cssEnabled" + CustomPerformerImageLocation = "custom_performer_image_location" + MaximumLoopDuration = "maximum_loop_duration" + AutostartVideo = "autostart_video" + AutostartVideoOnPlaySelected = "autostart_video_on_play_selected" + autostartVideoOnPlaySelectedDefault = true + ContinuePlaylistDefault = "continue_playlist_default" + ShowStudioAsText = "show_studio_as_text" + CSSEnabled = "cssEnabled" WallPlayback = "wall_playback" defaultWallPlayback = "video" @@ -826,15 +827,18 @@ func (i *Instance) GetAutostartVideo() bool { func (i *Instance) GetAutostartVideoOnPlaySelected() bool { i.Lock() defer i.Unlock() - viper.SetDefault(AutostartVideoOnPlaySelected, true) - return viper.GetBool(AutostartVideoOnPlaySelected) + + ret := autostartVideoOnPlaySelectedDefault + v := i.viper(AutostartVideoOnPlaySelected) + if v.IsSet(AutostartVideoOnPlaySelected) { + ret = v.GetBool(AutostartVideoOnPlaySelected) + } + + return ret } func (i *Instance) GetContinuePlaylistDefault() bool { - i.Lock() - defer i.Unlock() - viper.SetDefault(ContinuePlaylistDefault, false) - return viper.GetBool(ContinuePlaylistDefault) + return i.getBool(ContinuePlaylistDefault) } func (i *Instance) GetShowStudioAsText() bool { diff --git a/ui/v2.5/src/components/Changelog/versions/v0120.md b/ui/v2.5/src/components/Changelog/versions/v0120.md index 5b4e174f5..be03cd33b 100644 --- a/ui/v2.5/src/components/Changelog/versions/v0120.md +++ b/ui/v2.5/src/components/Changelog/versions/v0120.md @@ -6,4 +6,5 @@ * Added plugin hook for Tag merge operation. ([#2010](https://github.com/stashapp/stash/pull/2010)) ### 🐛 Bug fixes +* Fix Autostart Video on Play Selected and Continue Playlist default settings not working. ([#2050](https://github.com/stashapp/stash/pull/2050)) * Fix "Custom Performer Images" feature picking up non-image files. ([#2017](https://github.com/stashapp/stash/pull/2017))