refactor: remove redundant code

This commit is contained in:
rramiachraf
2024-06-11 21:02:58 +01:00
parent 3bf802c9c2
commit 41d13e1edb
4 changed files with 15 additions and 23 deletions

View File

@ -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)