feat(agents): Add artist url and top and similar songs to ListenBrainz agent (#4934)
* feat(agents): Add artist url and top songs to ListenBrainz agent * add newline at end of file * respond to some feedback * add more tests, include more metadata in top songs * add duration to album info * add similar artists from labs * add similar artists and track radio * fix(client): replace sort with slices.SortFunc for deterministic ordering of recordings with same score Signed-off-by: Deluan <deluan@navidrome.org> * fix: typos Signed-off-by: Deluan <deluan@navidrome.org> * refactor: use struct literal initialization consistently Signed-off-by: Deluan <deluan@navidrome.org> * feat: configurable artist and track algorithms Signed-off-by: Deluan <deluan@navidrome.org> * test configuration changes --------- Signed-off-by: Deluan <deluan@navidrome.org> Co-authored-by: Deluan Quintão <deluan@navidrome.org> Signed-off-by: Deluan <deluan@navidrome.org>
This commit is contained in:
@@ -194,8 +194,10 @@ type deezerOptions struct {
|
||||
}
|
||||
|
||||
type listenBrainzOptions struct {
|
||||
Enabled bool
|
||||
BaseURL string
|
||||
Enabled bool
|
||||
BaseURL string
|
||||
ArtistAlgorithm string
|
||||
TrackAlgorithm string
|
||||
}
|
||||
|
||||
type httpHeaderOptions struct {
|
||||
@@ -656,7 +658,9 @@ func setViperDefaults() {
|
||||
viper.SetDefault("deezer.enabled", true)
|
||||
viper.SetDefault("deezer.language", consts.DefaultInfoLanguage)
|
||||
viper.SetDefault("listenbrainz.enabled", true)
|
||||
viper.SetDefault("listenbrainz.baseurl", "https://api.listenbrainz.org/1/")
|
||||
viper.SetDefault("listenbrainz.baseurl", consts.DefaultListenBrainzBaseURL)
|
||||
viper.SetDefault("listenbrainz.artistalgorithm", consts.DefaultListenBrainzArtistAlgorithm)
|
||||
viper.SetDefault("listenbrainz.trackalgorithm", consts.DefaultListenBrainzTrackAlgorithm)
|
||||
viper.SetDefault("enablescrobblehistory", true)
|
||||
viper.SetDefault("httpheaders.frameoptions", "DENY")
|
||||
viper.SetDefault("backup.path", "")
|
||||
|
||||
Reference in New Issue
Block a user