misc: Migrate Artists page to GridView
Remove custom page implementation for Artists, and instead rely on the generic `GridView` approach. This also simplifies adding new sorting/filtering options as next improvements. The new `ArtistFilter` is a dummy implementation without any real filters at the moment. Also, the `go-jellyfin` upgrade is needed to correctly display the album count for each artist.
This commit is contained in:
@@ -29,10 +29,11 @@ func NewAlbumIterator(fetchFn AlbumFetchFn, filter mediaprovider.AlbumFilter, cb
|
||||
|
||||
type ArtistFetchFn func(offset, limit int) ([]*mediaprovider.Artist, error)
|
||||
|
||||
func NewArtistIterator(fetchFn ArtistFetchFn) mediaprovider.ArtistIterator {
|
||||
return &baseIter[mediaprovider.Artist, nilFilterOptions]{
|
||||
fetcher: fetchFn,
|
||||
filter: nilFilter[mediaprovider.Artist]{},
|
||||
func NewArtistIterator(fetchFn ArtistFetchFn, filter mediaprovider.ArtistFilter, cb func(string)) mediaprovider.ArtistIterator {
|
||||
return &baseIter[mediaprovider.Artist, mediaprovider.ArtistFilterOptions]{
|
||||
prefetchCB: func(a *mediaprovider.Artist) { cb(a.CoverArtID) },
|
||||
fetcher: fetchFn,
|
||||
filter: filter,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user