Add Stars to the DB, including Artists! Only if DevUseFolderScanner is true

This commit is contained in:
Deluan
2020-01-18 20:03:52 -05:00
parent a4b75fd69d
commit 128e165aba
18 changed files with 161 additions and 30 deletions
+9
View File
@@ -50,6 +50,7 @@ func FromArtist(ar *model.Artist) Entry {
e.Id = ar.ID
e.Title = ar.Name
e.AlbumCount = ar.AlbumCount
e.Starred = ar.StarredAt
e.IsDir = true
return e
}
@@ -137,3 +138,11 @@ func FromMediaFiles(mfs model.MediaFiles) Entries {
}
return entries
}
func FromArtists(ars model.Artists) Entries {
entries := make(Entries, len(ars))
for i, ar := range ars {
entries[i] = FromArtist(&ar)
}
return entries
}