mirror of
https://github.com/navidrome/navidrome.git
synced 2026-08-31 07:30:32 +00:00
The Jellyfin /Items/{id} endpoint resolved albums, artists, songs and
playlists by id but not genres, so a genre id returned 404. Finamp's
genre "See all" fetches the genre as the track list's parent item, and
that 404 crashed its screen to a blank page after the tracks flashed in.
Add a Genre lookup to resolveItemByID (backed by a new GenreRepository.Get)
so a genre id returns its MusicGenre BaseItemDto, matching real Jellyfin.
16 lines
429 B
Go
16 lines
429 B
Go
package model
|
|
|
|
type Genre struct {
|
|
ID string `structs:"id" json:"id,omitempty" toml:"id,omitempty" yaml:"id,omitempty"`
|
|
Name string `structs:"name" json:"name"`
|
|
SongCount int `structs:"-" json:"-" toml:"-" yaml:"-"`
|
|
AlbumCount int `structs:"-" json:"-" toml:"-" yaml:"-"`
|
|
}
|
|
|
|
type Genres []Genre
|
|
|
|
type GenreRepository interface {
|
|
GetAll(...QueryOptions) (Genres, error)
|
|
Get(id string) (*Genre, error)
|
|
}
|