feat(server): group Subsonic config options together
Signed-off-by: Deluan <deluan@navidrome.org>
This commit is contained in:
@@ -50,7 +50,7 @@ func AlbumsByArtistID(artistId string) Options {
|
||||
filters := []Sqlizer{
|
||||
persistence.Exists("json_tree(Participants, '$.albumartist')", Eq{"value": artistId}),
|
||||
}
|
||||
if conf.Server.SubsonicArtistParticipations {
|
||||
if conf.Server.Subsonic.ArtistParticipations {
|
||||
filters = append(filters,
|
||||
persistence.Exists("json_tree(Participants, '$.artist')", Eq{"value": artistId}),
|
||||
)
|
||||
|
||||
@@ -110,7 +110,7 @@ func toArtistID3(r *http.Request, a model.Artist) responses.ArtistID3 {
|
||||
|
||||
func toOSArtistID3(ctx context.Context, a model.Artist) *responses.OpenSubsonicArtistID3 {
|
||||
player, _ := request.PlayerFrom(ctx)
|
||||
if strings.Contains(conf.Server.DevOpenSubsonicDisabledClients, player.Client) {
|
||||
if strings.Contains(conf.Server.Subsonic.LegacyClients, player.Client) {
|
||||
return nil
|
||||
}
|
||||
artist := responses.OpenSubsonicArtistID3{
|
||||
@@ -197,7 +197,7 @@ func childFromMediaFile(ctx context.Context, mf model.MediaFile) responses.Child
|
||||
|
||||
func osChildFromMediaFile(ctx context.Context, mf model.MediaFile) *responses.OpenSubsonicChild {
|
||||
player, _ := request.PlayerFrom(ctx)
|
||||
if strings.Contains(conf.Server.DevOpenSubsonicDisabledClients, player.Client) {
|
||||
if strings.Contains(conf.Server.Subsonic.LegacyClients, player.Client) {
|
||||
return nil
|
||||
}
|
||||
child := responses.OpenSubsonicChild{}
|
||||
@@ -301,7 +301,7 @@ func childFromAlbum(ctx context.Context, al model.Album) responses.Child {
|
||||
|
||||
func osChildFromAlbum(ctx context.Context, al model.Album) *responses.OpenSubsonicChild {
|
||||
player, _ := request.PlayerFrom(ctx)
|
||||
if strings.Contains(conf.Server.DevOpenSubsonicDisabledClients, player.Client) {
|
||||
if strings.Contains(conf.Server.Subsonic.LegacyClients, player.Client) {
|
||||
return nil
|
||||
}
|
||||
child := responses.OpenSubsonicChild{}
|
||||
@@ -376,7 +376,7 @@ func buildAlbumID3(ctx context.Context, album model.Album) responses.AlbumID3 {
|
||||
|
||||
func buildOSAlbumID3(ctx context.Context, album model.Album) *responses.OpenSubsonicAlbumID3 {
|
||||
player, _ := request.PlayerFrom(ctx)
|
||||
if strings.Contains(conf.Server.DevOpenSubsonicDisabledClients, player.Client) {
|
||||
if strings.Contains(conf.Server.Subsonic.LegacyClients, player.Client) {
|
||||
return nil
|
||||
}
|
||||
dir := responses.OpenSubsonicAlbumID3{}
|
||||
|
||||
Reference in New Issue
Block a user