Expose OpenSubsonic fields Genres, MusicBrainzId, Bpm, Comment (#2597)
* add Genres to subsonic responses * add genres in GetAlbum response * add musicBrainzId * add Bpm and Comment OpenSubsonic fields * remove omitempty on OpenSubsonic fields * add custom JSON marshalers to ensure genres attribute is non-nil * regenerate snapshots to capture now-mandatory fields
This commit is contained in:
@@ -423,6 +423,7 @@ func (api *Router) buildAlbum(ctx context.Context, album *model.Album, mfs model
|
||||
}
|
||||
dir.Year = int32(album.MaxYear)
|
||||
dir.Genre = album.Genre
|
||||
dir.Genres = itemGenresFromGenres(album.Genres)
|
||||
dir.UserRating = int32(album.Rating)
|
||||
if !album.CreatedAt.IsZero() {
|
||||
dir.Created = &album.CreatedAt
|
||||
@@ -430,6 +431,7 @@ func (api *Router) buildAlbum(ctx context.Context, album *model.Album, mfs model
|
||||
if album.Starred {
|
||||
dir.Starred = &album.StarredAt
|
||||
}
|
||||
dir.MusicBrainzId = album.MbzAlbumID
|
||||
dir.Song = childrenFromMediaFiles(ctx, mfs)
|
||||
return dir
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user