🎧 Your Personal Streaming Service
Go airsonicmadsonicmedia-servermusicmusic-servernavidromeopensubsonicraspberry-piself-hostedstreamerstreaming-apistreaming-audiosubsonicsubsonic-server
Better ArtistInfo field names
Deluan29d8950e5bc2
diff --git a/core/external_info.go b/core/external_info.goindex 38b6e46b5..b82499281 100644--- a/core/external_info.go+++ b/core/external_info.go@@ -121,10 +121,10 @@ func (e *externalInfo) callArtistImages(ctx context.Context, artist *model.Artisfunc (e *externalInfo) setBio(info *model.ArtistInfo, bio string) {policy := bluemonday.UGCPolicy()- if info.Bio == "" {+ if info.Biography == "" {bio = policy.Sanitize(bio)bio = strings.ReplaceAll(bio, "\n", " ")- info.Bio = strings.ReplaceAll(bio, "<a ", "<a target='_blank' ")+ info.Biography = strings.ReplaceAll(bio, "<a ", "<a target='_blank' ")}}@@ -134,9 +134,9 @@ func (e *externalInfo) setLastFMUrl(info *model.ArtistInfo, url string) {}}-func (e *externalInfo) setMbzID(info *model.ArtistInfo, mbzID string) {- if info.MbzID == "" {- info.MbzID = mbzID+func (e *externalInfo) setMbzID(info *model.ArtistInfo, mbID string) {+ if info.MBID == "" {+ info.MBID = mbID}}diff --git a/model/artist_info.go b/model/artist_info.goindex fff2c2c39..f8eac3cd3 100644--- a/model/artist_info.go+++ b/model/artist_info.go@@ -3,8 +3,8 @@ package modeltype ArtistInfo struct {ID stringName string- MbzID string- Bio string+ MBID string+ Biography stringSimilar []ArtistSmallImageUrl stringMediumImageUrl stringdiff --git a/server/subsonic/browsing.go b/server/subsonic/browsing.goindex a0a5957bf..be5db10aa 100644--- a/server/subsonic/browsing.go+++ b/server/subsonic/browsing.go@@ -267,12 +267,12 @@ func (c *BrowsingController) GetArtistInfo(w http.ResponseWriter, r *http.Requesresponse := newResponse()response.ArtistInfo = &responses.ArtistInfo{}- response.ArtistInfo.Biography = info.Bio+ response.ArtistInfo.Biography = info.Biographyresponse.ArtistInfo.SmallImageUrl = info.SmallImageUrlresponse.ArtistInfo.MediumImageUrl = info.MediumImageUrlresponse.ArtistInfo.LargeImageUrl = info.LargeImageUrlresponse.ArtistInfo.LastFmUrl = info.LastFMUrl- response.ArtistInfo.MusicBrainzID = info.MbzID+ response.ArtistInfo.MusicBrainzID = info.MBIDfor _, s := range info.Similar {similar := responses.Artist{}similar.Id = s.ID