Add Stars to the DB, including Artists! Only if DevUseFolderScanner is true
This commit is contained in:
+4
-4
@@ -70,10 +70,7 @@ func (c *SearchingController) Search2(w http.ResponseWriter, r *http.Request) (*
|
||||
|
||||
response := NewResponse()
|
||||
searchResult2 := &responses.SearchResult2{}
|
||||
searchResult2.Artist = make([]responses.Artist, len(as))
|
||||
for i, e := range as {
|
||||
searchResult2.Artist[i] = responses.Artist{Id: e.Id, Name: e.Title}
|
||||
}
|
||||
searchResult2.Artist = ToArtists(as)
|
||||
searchResult2.Album = ToChildren(als)
|
||||
searchResult2.Song = ToChildren(mfs)
|
||||
response.SearchResult2 = searchResult2
|
||||
@@ -97,6 +94,9 @@ func (c *SearchingController) Search3(w http.ResponseWriter, r *http.Request) (*
|
||||
CoverArt: e.CoverArt,
|
||||
AlbumCount: e.AlbumCount,
|
||||
}
|
||||
if !e.Starred.IsZero() {
|
||||
searchResult3.Artist[i].Starred = &e.Starred
|
||||
}
|
||||
}
|
||||
searchResult3.Album = ToAlbums(als)
|
||||
searchResult3.Song = ToChildren(mfs)
|
||||
|
||||
Reference in New Issue
Block a user