mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 04:44:37 +03:00
DLNA (#1364)
This commit is contained in:
@@ -124,6 +124,12 @@ const CSSEnabled = "cssEnabled"
|
||||
const WallPlayback = "wall_playback"
|
||||
const SlideshowDelay = "slideshow_delay"
|
||||
|
||||
// DLNA options
|
||||
const DLNAServerName = "dlna.server_name"
|
||||
const DLNADefaultEnabled = "dlna.default_enabled"
|
||||
const DLNADefaultIPWhitelist = "dlna.default_whitelist"
|
||||
const DLNAInterfaces = "dlna.interfaces"
|
||||
|
||||
// Logging options
|
||||
const LogFile = "logFile"
|
||||
const LogOut = "logOut"
|
||||
@@ -627,6 +633,29 @@ func (i *Instance) GetCSSEnabled() bool {
|
||||
return viper.GetBool(CSSEnabled)
|
||||
}
|
||||
|
||||
// GetDLNAServerName returns the visible name of the DLNA server. If empty,
|
||||
// "stash" will be used.
|
||||
func (i *Instance) GetDLNAServerName() string {
|
||||
return viper.GetString(DLNAServerName)
|
||||
}
|
||||
|
||||
// GetDLNADefaultEnabled returns true if the DLNA is enabled by default.
|
||||
func (i *Instance) GetDLNADefaultEnabled() bool {
|
||||
return viper.GetBool(DLNADefaultEnabled)
|
||||
}
|
||||
|
||||
// GetDLNADefaultIPWhitelist returns a list of IP addresses/wildcards that
|
||||
// are allowed to use the DLNA service.
|
||||
func (i *Instance) GetDLNADefaultIPWhitelist() []string {
|
||||
return viper.GetStringSlice(DLNADefaultIPWhitelist)
|
||||
}
|
||||
|
||||
// GetDLNAInterfaces returns a list of interface names to expose DLNA on. If
|
||||
// empty, runs on all interfaces.
|
||||
func (i *Instance) GetDLNAInterfaces() []string {
|
||||
return viper.GetStringSlice(DLNAInterfaces)
|
||||
}
|
||||
|
||||
// GetLogFile returns the filename of the file to output logs to.
|
||||
// An empty string means that file logging will be disabled.
|
||||
func (i *Instance) GetLogFile() string {
|
||||
|
||||
Reference in New Issue
Block a user