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
+3 -1
View File
@@ -36,7 +36,9 @@ func (s *mediaFileMapper) toMediaFile(md *metadata.Tags) model.MediaFile {
mf.Artist = s.mapArtistName(md)
mf.AlbumArtistID = s.albumArtistID(md)
mf.AlbumArtist = s.mapAlbumArtistName(md)
mf.Genre = md.Genre()
if len(md.Genres()) > 0 {
mf.Genre = md.Genres()[0]
}
mf.Compilation = md.Compilation()
mf.Year = md.Year()
mf.TrackNumber, _ = md.TrackNumber()