This will be available in "go fix" within Go 1.26 but in the meantime:
go run golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@latest -fix -test ./...
Include both `Album Count` and `Random` sortings for the Artists page.
This change also fixes the Artist search feature in Jellyfin, which was
broken because of an open issue on Jellyfin [1]. The current workaround
is to do the filtering locally after receiving all results from Jellyfin
API.
Also, as the Jellyfin API doesn't include a sorting option for
`AlbumCount`, we need to disable pagination when that option is
selected, to receive all artists, and run the sorting locally.
[1] Related issue: https://github.com/jellyfin/jellyfin/issues/8222
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.
The Grid view and related components were highly coupled to Albums,
including the filter button that is currently used only for album
filtering.
As part of the migration of Artists to Grid view, this is the smallest
possible change to convert many of the existing code to
generics/interfaces that will allow different media to be displayed and
filtered by using Grid views.
The main changes in this diff are:
* Introduction of generics for Media types (`M`) and Filter options
(`F`), which can be later extended to other entities besides Albums.
* Complete decoupling of `GridViewPage` and related components from
Albums (making these pages also generic).
* Refactoring of Subsonic/Jellyfin specific code to understand these new
generics when dealing with filtering logic.