refactor: remove redundant code
This commit is contained in:
@ -16,7 +16,7 @@ type AlbumPreview struct {
|
||||
type Album struct {
|
||||
AlbumPreview
|
||||
Artist ArtistPreview
|
||||
About [2]string
|
||||
About string
|
||||
|
||||
Tracks []Track
|
||||
}
|
||||
@ -70,8 +70,7 @@ func (a *Album) parseAlbumData(doc *goquery.Document) error {
|
||||
}
|
||||
a.Name = albumData.Name
|
||||
a.Image = albumData.Image
|
||||
a.About[0] = albumData.Description
|
||||
a.About[1] = truncateText(albumData.Description)
|
||||
a.About = albumData.Description
|
||||
|
||||
for _, track := range albumMetadataFromPage.AlbumAppearances {
|
||||
url := strings.Replace(track.Song.Url, "https://genius.com", "", -1)
|
||||
|
Reference in New Issue
Block a user