Add genre tables, read multiple-genres from tags

This commit is contained in:
Deluan
2021-07-15 19:53:40 -04:00
committed by Deluan Quintão
parent 1f0314021e
commit 7cd3a8ba67
13 changed files with 205 additions and 53 deletions
+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}
}