mirror of
https://github.com/navidrome/navidrome.git
synced 2026-05-03 06:51:16 +00:00
feat(conf): add MaxConcurrentTranscodes and dev throttle config options
This commit is contained in:
parent
58f7959204
commit
9219a8c2a4
@ -58,6 +58,7 @@ type configOptions struct {
|
|||||||
PlaylistsPath string
|
PlaylistsPath string
|
||||||
SmartPlaylistRefreshDelay time.Duration
|
SmartPlaylistRefreshDelay time.Duration
|
||||||
AutoTranscodeDownload bool
|
AutoTranscodeDownload bool
|
||||||
|
MaxConcurrentTranscodes int
|
||||||
DefaultDownsamplingFormat string
|
DefaultDownsamplingFormat string
|
||||||
Search searchOptions `json:",omitzero"`
|
Search searchOptions `json:",omitzero"`
|
||||||
SimilarSongsMatchThreshold int
|
SimilarSongsMatchThreshold int
|
||||||
@ -113,35 +114,37 @@ type configOptions struct {
|
|||||||
Agents string
|
Agents string
|
||||||
|
|
||||||
// DevFlags. These are used to enable/disable debugging and incomplete features
|
// DevFlags. These are used to enable/disable debugging and incomplete features
|
||||||
DevLogLevels map[string]string `json:",omitempty"`
|
DevLogLevels map[string]string `json:",omitempty"`
|
||||||
DevLogSourceLine bool
|
DevLogSourceLine bool
|
||||||
DevEnableProfiler bool
|
DevEnableProfiler bool
|
||||||
DevAutoCreateAdminPassword string
|
DevAutoCreateAdminPassword string
|
||||||
DevAutoLoginUsername string
|
DevAutoLoginUsername string
|
||||||
DevActivityPanel bool
|
DevActivityPanel bool
|
||||||
DevActivityPanelUpdateRate time.Duration
|
DevActivityPanelUpdateRate time.Duration
|
||||||
DevSidebarPlaylists bool
|
DevSidebarPlaylists bool
|
||||||
DevShowArtistPage bool
|
DevShowArtistPage bool
|
||||||
DevUIShowConfig bool
|
DevUIShowConfig bool
|
||||||
DevNewEventStream bool
|
DevNewEventStream bool
|
||||||
DevOffsetOptimize int
|
DevOffsetOptimize int
|
||||||
DevArtworkMaxRequests int
|
DevArtworkMaxRequests int
|
||||||
DevArtworkThrottleBacklogLimit int
|
DevArtworkThrottleBacklogLimit int
|
||||||
DevArtworkThrottleBacklogTimeout time.Duration
|
DevArtworkThrottleBacklogTimeout time.Duration
|
||||||
DevArtistInfoTimeToLive time.Duration
|
DevTranscodeThrottleBacklogLimit int
|
||||||
DevAlbumInfoTimeToLive time.Duration
|
DevTranscodeThrottleBacklogTimeout time.Duration
|
||||||
DevExternalScanner bool
|
DevArtistInfoTimeToLive time.Duration
|
||||||
DevScannerThreads uint
|
DevAlbumInfoTimeToLive time.Duration
|
||||||
DevSelectiveWatcher bool
|
DevExternalScanner bool
|
||||||
DevInsightsInitialDelay time.Duration
|
DevScannerThreads uint
|
||||||
DevEnablePlayerInsights bool
|
DevSelectiveWatcher bool
|
||||||
DevEnablePluginsInsights bool
|
DevInsightsInitialDelay time.Duration
|
||||||
DevPluginCompilationTimeout time.Duration
|
DevEnablePlayerInsights bool
|
||||||
DevExternalArtistFetchMultiplier float64
|
DevEnablePluginsInsights bool
|
||||||
DevOptimizeDB bool
|
DevPluginCompilationTimeout time.Duration
|
||||||
DevPreserveUnicodeInExternalCalls bool
|
DevExternalArtistFetchMultiplier float64
|
||||||
DevEnableMediaFileProbe bool
|
DevOptimizeDB bool
|
||||||
DevJpegCoverArt bool
|
DevPreserveUnicodeInExternalCalls bool
|
||||||
|
DevEnableMediaFileProbe bool
|
||||||
|
DevJpegCoverArt bool
|
||||||
}
|
}
|
||||||
|
|
||||||
type scannerOptions struct {
|
type scannerOptions struct {
|
||||||
@ -663,6 +666,7 @@ func setViperDefaults() {
|
|||||||
viper.SetDefault("enablem3uexternalalbumart", false)
|
viper.SetDefault("enablem3uexternalalbumart", false)
|
||||||
viper.SetDefault("enablemediafilecoverart", true)
|
viper.SetDefault("enablemediafilecoverart", true)
|
||||||
viper.SetDefault("autotranscodedownload", false)
|
viper.SetDefault("autotranscodedownload", false)
|
||||||
|
viper.SetDefault("maxconcurrenttranscodes", 4)
|
||||||
viper.SetDefault("defaultdownsamplingformat", consts.DefaultDownsamplingFormat)
|
viper.SetDefault("defaultdownsamplingformat", consts.DefaultDownsamplingFormat)
|
||||||
viper.SetDefault("search.fullstring", false)
|
viper.SetDefault("search.fullstring", false)
|
||||||
viper.SetDefault("search.backend", "fts")
|
viper.SetDefault("search.backend", "fts")
|
||||||
@ -770,6 +774,8 @@ func setViperDefaults() {
|
|||||||
viper.SetDefault("devartworkmaxrequests", max(4, runtime.NumCPU()))
|
viper.SetDefault("devartworkmaxrequests", max(4, runtime.NumCPU()))
|
||||||
viper.SetDefault("devartworkthrottlebackloglimit", consts.RequestThrottleBacklogLimit)
|
viper.SetDefault("devartworkthrottlebackloglimit", consts.RequestThrottleBacklogLimit)
|
||||||
viper.SetDefault("devartworkthrottlebacklogtimeout", consts.RequestThrottleBacklogTimeout)
|
viper.SetDefault("devartworkthrottlebacklogtimeout", consts.RequestThrottleBacklogTimeout)
|
||||||
|
viper.SetDefault("devtranscodethrottlebackloglimit", consts.RequestThrottleBacklogLimit)
|
||||||
|
viper.SetDefault("devtranscodethrottlebacklogtimeout", consts.RequestThrottleBacklogTimeout)
|
||||||
viper.SetDefault("devartistinfotimetolive", consts.ArtistInfoTimeToLive)
|
viper.SetDefault("devartistinfotimetolive", consts.ArtistInfoTimeToLive)
|
||||||
viper.SetDefault("devalbuminfotimetolive", consts.AlbumInfoTimeToLive)
|
viper.SetDefault("devalbuminfotimetolive", consts.AlbumInfoTimeToLive)
|
||||||
viper.SetDefault("devexternalscanner", true)
|
viper.SetDefault("devexternalscanner", true)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user