Fixed (?) Artist x AlbumArtist

This commit is contained in:
Deluan 2016-03-03 00:25:26 -05:00
parent 7d5cafb17a
commit 1aeb22dcb7
3 changed files with 6 additions and 2 deletions

View File

@ -40,7 +40,7 @@ func (c *GetMusicDirectoryController) Get() {
dir.Child[i].IsDir = true
dir.Child[i].Album = al.Name
dir.Child[i].Year = al.Year
dir.Child[i].Artist = a.Name //TODO AlbumArtist
dir.Child[i].Artist = al.Artist
dir.Child[i].Genre = al.Genre
}
} else {
@ -55,7 +55,7 @@ func (c *GetMusicDirectoryController) Get() {
dir.Child[i].IsDir = false
dir.Child[i].Album = mf.Album
dir.Child[i].Year = mf.Year
dir.Child[i].Artist = mf.AlbumArtist
dir.Child[i].Artist = mf.Artist
dir.Child[i].Genre = mf.Genre
dir.Child[i].Track = mf.Track
dir.Child[i].Duration = mf.Duration

View File

@ -5,6 +5,8 @@ type Album struct {
Name string
ArtistId string `parent:"artist"`
CoverArtPath string // TODO http://stackoverflow.com/questions/13795842/linking-itunes-itc2-files-and-ituneslibrary-xml
Artist string
AlbumArtist string
Year int
Compilation bool
Rating int

View File

@ -88,6 +88,8 @@ func parseTrack(t *Track) (*domain.MediaFile, *domain.Album, *domain.Artist) {
Year: t.Year,
Compilation: t.Compilation,
Genre: t.Genre,
Artist: t.Artist,
AlbumArtist: t.AlbumArtist,
}
artist := &domain.Artist{