Skip to content

🎧 Your Personal Streaming Service

Better ArtistInfo field names

Deluan29d8950e5bc2
diff --git a/core/external_info.go b/core/external_info.go
index 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.Artis
func (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.go
index fff2c2c39..f8eac3cd3 100644
--- a/model/artist_info.go
+++ b/model/artist_info.go
@@ -3,8 +3,8 @@ package model
type ArtistInfo struct {
ID string
Name string
- MbzID string
- Bio string
+ MBID string
+ Biography string
Similar []Artist
SmallImageUrl string
MediumImageUrl string
diff --git a/server/subsonic/browsing.go b/server/subsonic/browsing.go
index 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.Reques
response := newResponse()
response.ArtistInfo = &responses.ArtistInfo{}
- response.ArtistInfo.Biography = info.Bio
+ response.ArtistInfo.Biography = info.Biography
response.ArtistInfo.SmallImageUrl = info.SmallImageUrl
response.ArtistInfo.MediumImageUrl = info.MediumImageUrl
response.ArtistInfo.LargeImageUrl = info.LargeImageUrl
response.ArtistInfo.LastFmUrl = info.LastFMUrl
- response.ArtistInfo.MusicBrainzID = info.MbzID
+ response.ArtistInfo.MusicBrainzID = info.MBID
for _, s := range info.Similar {
similar := responses.Artist{}
similar.Id = s.ID