Documentation
¶
Overview ¶
Package jellyfin adapts the shared Emby/Jellyfin client (internal/embyapi) to a Jellyfin server and exposes it as a playlist provider.
Index ¶
- func IsStreamURL(path string) bool
- type Client
- type Provider
- func (p *Provider) AlbumList(sortType string, offset, size int) ([]provider.AlbumInfo, error)
- func (p *Provider) AlbumSortTypes() []provider.SortType
- func (p *Provider) AlbumTracks(albumID string) ([]playlist.Track, error)
- func (p *Provider) ArtistAlbums(artistID string) ([]provider.AlbumInfo, error)
- func (p *Provider) Artists() ([]provider.ArtistInfo, error)
- func (p *Provider) CanReportPlayback(track playlist.Track) bool
- func (p *Provider) DefaultAlbumSort() string
- func (p *Provider) Name() string
- func (p *Provider) Playlists() ([]playlist.PlaylistInfo, error)
- func (p *Provider) Refresh()
- func (p *Provider) ReportNowPlaying(track playlist.Track, position time.Duration, canSeek bool)
- func (p *Provider) ReportScrobble(track playlist.Track, elapsed, _ time.Duration, canSeek bool)
- func (p *Provider) SearchTracks(_ context.Context, query string, limit int) ([]playlist.Track, error)
- func (p *Provider) Tracks(albumID string) ([]playlist.Track, error)
- type Track
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsStreamURL ¶
IsStreamURL reports whether the URL is a Jellyfin item download endpoint. Used by the player to route these URLs through the buffered ffmpeg pipeline.
Types ¶
type Client ¶
Client and Track alias the shared embyapi types so the provider layer reads naturally and external callers keep using jellyfin.Client.
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider implements playlist.Provider for a Jellyfin server. Playlists() returns albums across all music views. Tracks() returns the tracks for a given album item.
func NewFromConfig ¶
func NewFromConfig(cfg config.JellyfinConfig) *Provider
NewFromConfig returns a Provider from a JellyfinConfig, or nil if URL or token is missing.
func (*Provider) AlbumSortTypes ¶
func (*Provider) AlbumTracks ¶
func (*Provider) ArtistAlbums ¶
func (*Provider) CanReportPlayback ¶
func (*Provider) DefaultAlbumSort ¶
func (*Provider) Playlists ¶
func (p *Provider) Playlists() ([]playlist.PlaylistInfo, error)
Playlists returns all albums across all Jellyfin music views. Results are cached after the first successful call.
func (*Provider) Refresh ¶
func (p *Provider) Refresh()
Refresh clears cached playlist, track, and album data so the next call re-fetches from the server. Implements playlist.Refresher.