Fix setting autostart options (#2050)

This commit is contained in:
WithoutPants 2021-11-22 16:19:59 +11:00 committed by GitHub
parent 2277d0a919
commit f2903d4dcf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 13 deletions

View File

@ -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 {

View File

@ -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))