Remove CoverArtID, fix tests
This commit is contained in:
+1
-2
@@ -7,8 +7,7 @@ type Album struct {
|
||||
|
||||
ID string `structs:"id" json:"id" orm:"column(id)"`
|
||||
Name string `structs:"name" json:"name"`
|
||||
EmbedArtPath string `structs:"cover_art_path" json:"coverArtPath"`
|
||||
EmbedArtId string `structs:"cover_art_id" json:"coverArtId"`
|
||||
EmbedArtPath string `structs:"embed_art_path" json:"embedArtPath"`
|
||||
ArtistID string `structs:"artist_id" json:"artistId" orm:"column(artist_id)"`
|
||||
Artist string `structs:"artist" json:"artist"`
|
||||
AlbumArtistID string `structs:"album_artist_id" json:"albumArtistId" orm:"column(album_artist_id)"`
|
||||
|
||||
+1
-2
@@ -135,8 +135,7 @@ func (mfs MediaFiles) ToAlbum() Album {
|
||||
m.Album, m.AlbumArtist, m.Artist,
|
||||
m.SortAlbumName, m.SortAlbumArtistName, m.SortArtistName,
|
||||
m.DiscSubtitle)
|
||||
if m.HasCoverArt && a.EmbedArtId == "" {
|
||||
a.EmbedArtId = m.ID
|
||||
if m.HasCoverArt && a.EmbedArtPath == "" {
|
||||
a.EmbedArtPath = m.Path
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,7 +51,6 @@ var _ = Describe("MediaFiles", func() {
|
||||
Expect(album.MbzAlbumComment).To(Equal("MbzAlbumComment"))
|
||||
Expect(album.CatalogNum).To(Equal("CatalogNum"))
|
||||
Expect(album.Compilation).To(BeTrue())
|
||||
Expect(album.EmbedArtId).To(Equal("2"))
|
||||
Expect(album.EmbedArtPath).To(Equal("/music/file.mp3"))
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user