From 03ad6e972a7ae57daff057da5158270adf16898a Mon Sep 17 00:00:00 2001 From: Deluan <deluan@navidrome.org> Date: Fri, 16 Jul 2021 21:06:47 -0400 Subject: [PATCH] Removed unused attributes in Last.fm responses --- core/agents/lastfm/responses.go | 19 +++++-------------- core/agents/lastfm/responses_test.go | 5 ----- 2 files changed, 5 insertions(+), 19 deletions(-) diff --git a/core/agents/lastfm/responses.go b/core/agents/lastfm/responses.go index 2ccc7db65..06914ec56 100644 --- a/core/agents/lastfm/responses.go +++ b/core/agents/lastfm/responses.go @@ -13,15 +13,11 @@ type Response struct { } type Artist struct { - Name string `json:"name"` - MBID string `json:"mbid"` - URL string `json:"url"` - Image []ArtistImage `json:"image"` - Similar SimilarArtists `json:"similar"` - Tags struct { - Tag []ArtistTag `json:"tag"` - } `json:"tags"` - Bio ArtistBio `json:"bio"` + Name string `json:"name"` + MBID string `json:"mbid"` + URL string `json:"url"` + Image []ArtistImage `json:"image"` + Bio ArtistBio `json:"bio"` } type SimilarArtists struct { @@ -38,11 +34,6 @@ type ArtistImage struct { Size string `json:"size"` } -type ArtistTag struct { - Name string `json:"name"` - URL string `json:"url"` -} - type ArtistBio struct { Published string `json:"published"` Summary string `json:"summary"` diff --git a/core/agents/lastfm/responses_test.go b/core/agents/lastfm/responses_test.go index ce6fc222b..96580bad3 100644 --- a/core/agents/lastfm/responses_test.go +++ b/core/agents/lastfm/responses_test.go @@ -20,11 +20,6 @@ var _ = Describe("LastFM responses", func() { Expect(resp.Artist.MBID).To(Equal("a3cb23fc-acd3-4ce0-8f36-1e5aa6a18432")) Expect(resp.Artist.URL).To(Equal("https://www.last.fm/music/U2")) Expect(resp.Artist.Bio.Summary).To(ContainSubstring("U2 é uma das mais importantes bandas de rock de todos os tempos")) - - similarArtists := []string{"Passengers", "INXS", "R.E.M.", "Simple Minds", "Bono"} - for i, similar := range similarArtists { - Expect(resp.Artist.Similar.Artists[i].Name).To(Equal(similar)) - } }) })