mirror of
https://github.com/navidrome/navidrome.git
synced 2026-07-09 17:18:45 +00:00
feat(conf): add PID.Artist config option with default 'name'
This commit is contained in:
parent
823d851b75
commit
273c8d23f1
2 changed files with 11 additions and 6 deletions
|
|
@ -242,8 +242,9 @@ type backupOptions struct {
|
|||
}
|
||||
|
||||
type pidOptions struct {
|
||||
Track string
|
||||
Album string
|
||||
Track string
|
||||
Album string
|
||||
Artist string
|
||||
}
|
||||
|
||||
type inspectOptions struct {
|
||||
|
|
@ -439,6 +440,7 @@ func Load(noConfigDump bool) {
|
|||
// Make sure we don't have empty PIDs
|
||||
Server.PID.Album = cmp.Or(Server.PID.Album, consts.DefaultAlbumPID)
|
||||
Server.PID.Track = cmp.Or(Server.PID.Track, consts.DefaultTrackPID)
|
||||
Server.PID.Artist = cmp.Or(Server.PID.Artist, consts.DefaultArtistPID)
|
||||
|
||||
// Parse LastFM.Language into Languages slice (comma-separated, with fallback to DefaultInfoLanguage)
|
||||
Server.LastFM.Languages = parseLanguages(Server.LastFM.Language)
|
||||
|
|
@ -851,6 +853,7 @@ func setViperDefaults() {
|
|||
viper.SetDefault("backup.count", 0)
|
||||
viper.SetDefault("pid.track", consts.DefaultTrackPID)
|
||||
viper.SetDefault("pid.album", consts.DefaultAlbumPID)
|
||||
viper.SetDefault("pid.artist", consts.DefaultArtistPID)
|
||||
viper.SetDefault("inspect.enabled", true)
|
||||
viper.SetDefault("inspect.maxrequests", 1)
|
||||
viper.SetDefault("inspect.backloglimit", consts.RequestThrottleBacklogLimit)
|
||||
|
|
|
|||
|
|
@ -122,10 +122,12 @@ const (
|
|||
|
||||
const (
|
||||
//DefaultAlbumPID = "album_legacy"
|
||||
DefaultAlbumPID = "musicbrainz_albumid|albumartistid,album,albumversion,releasedate"
|
||||
DefaultTrackPID = "musicbrainz_trackid|albumid,discnumber,tracknumber,title"
|
||||
PIDAlbumKey = "PIDAlbum"
|
||||
PIDTrackKey = "PIDTrack"
|
||||
DefaultAlbumPID = "musicbrainz_albumid|albumartistid,album,albumversion,releasedate"
|
||||
DefaultTrackPID = "musicbrainz_trackid|albumid,discnumber,tracknumber,title"
|
||||
DefaultArtistPID = "name"
|
||||
PIDAlbumKey = "PIDAlbum"
|
||||
PIDTrackKey = "PIDTrack"
|
||||
PIDArtistKey = "PIDArtist"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue