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:
Michael Manganiello
2024-03-30 12:42:48 -03:00
parent b7e7e959ff
commit 66658b1401
12 changed files with 254 additions and 220 deletions
+10 -8
View File
@@ -164,20 +164,22 @@ func (s *ServerManager) connect(connection ServerConnection, password string) (m
if connection.ServerType == ServerTypeJellyfin {
client, err := jellyfin.NewClient(connection.Hostname, res.AppName, res.AppVersion, jellyfin.WithTimeout(10*time.Second))
if err != nil {
log.Print("Error creating Jellyfin client")
log.Printf("error creating Jellyfin client: %s", err.Error())
return nil, err
}
cli = &jellyfinMP.JellyfinServer{
Client: *client,
}
altClient, err := jellyfin.NewClient(connection.AltHostname, res.AppName, res.AppVersion, jellyfin.WithTimeout(10*time.Second))
if err != nil {
log.Print("Error creating Jellyfin alternative client")
return nil, err
}
altCli = &jellyfinMP.JellyfinServer{
Client: *altClient,
if connection.AltHostname != "" {
altClient, err := jellyfin.NewClient(connection.AltHostname, res.AppName, res.AppVersion, jellyfin.WithTimeout(10*time.Second))
if err != nil {
log.Printf("error creating Jellyfin alternative client: %s", err.Error())
return nil, err
}
altCli = &jellyfinMP.JellyfinServer{
Client: *altClient,
}
}
} else {
cli = &subsonicMP.SubsonicServer{