Add genre tables, read multiple-genres from tags

This commit is contained in:
Deluan authored and Deluan Quintão committed 2021-07-20 17:45:08 -04:00
1 parent 1f0314021e
commit 7cd3a8ba67
13 files changed
+205 -53

No files matched your search

+5 -1
View File
@@ -110,7 +110,11 @@ func toArtistID3(ctx context.Context, a model.Artist) responses.ArtistID3 {
func toGenres(genres model.Genres) *responses.Genres {
response := make([]responses.Genre, len(genres))
for i, g := range genres {
response[i] = responses.Genre(g)
response[i] = responses.Genre{
Name: g.Name,
SongCount: g.SongCount,
AlbumCount: g.AlbumCount,
}
}
return &responses.Genres{Genre: response}
}