navidrome/model/genre.go
Deluan 8e0ff1a235 fix(jellyfin): resolve genre id as a MusicGenre item
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.
2026-08-10 21:37:57 -04:00

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)
}