emby

package
v1.60.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 16, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package emby adapts the shared Emby/Jellyfin client (internal/embyapi) to an Emby server and exposes it as a playlist provider.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsStreamURL

func IsStreamURL(path string) bool

IsStreamURL reports whether the URL is an Emby item download endpoint. Used by the player to route these URLs through the buffered ffmpeg pipeline.

Types

type Client

type Client = embyapi.Client

Client and Track alias the shared embyapi types so the provider layer reads naturally and external callers keep using emby.Client.

func NewClient

func NewClient(baseURL, token, userID, user, password string) *Client

NewClient returns a Client for the given Emby server URL and credentials.

type Provider

type Provider struct {
	// contains filtered or unexported fields
}

Provider implements playlist.Provider for an Emby server. Playlists() returns albums across all music views. Tracks() returns the tracks for a given album item.

func NewFromConfig

func NewFromConfig(cfg config.EmbyConfig) *Provider

NewFromConfig returns a Provider from an EmbyConfig, or nil if URL or token is missing.

func (*Provider) AlbumList

func (p *Provider) AlbumList(sortType string, offset, size int) ([]provider.AlbumInfo, error)

func (*Provider) AlbumSortTypes

func (p *Provider) AlbumSortTypes() []provider.SortType

func (*Provider) AlbumTracks

func (p *Provider) AlbumTracks(albumID string) ([]playlist.Track, error)

func (*Provider) ArtistAlbums

func (p *Provider) ArtistAlbums(artistID string) ([]provider.AlbumInfo, error)

func (*Provider) Artists

func (p *Provider) Artists() ([]provider.ArtistInfo, error)

func (*Provider) CanReportPlayback

func (p *Provider) CanReportPlayback(track playlist.Track) bool

func (*Provider) DefaultAlbumSort

func (p *Provider) DefaultAlbumSort() string

func (*Provider) Name

func (p *Provider) Name() string

Name returns the display name used in the provider selector.

func (*Provider) Playlists

func (p *Provider) Playlists() ([]playlist.PlaylistInfo, error)

Playlists returns all albums across all Emby 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.

func (*Provider) ReportNowPlaying

func (p *Provider) ReportNowPlaying(track playlist.Track, position time.Duration, canSeek bool)

func (*Provider) ReportScrobble

func (p *Provider) ReportScrobble(track playlist.Track, elapsed, _ time.Duration, canSeek bool)

func (*Provider) SearchTracks

func (p *Provider) SearchTracks(_ context.Context, query string, limit int) ([]playlist.Track, error)

SearchTracks searches the Emby music library for tracks matching query. Implements provider.Searcher.

func (*Provider) Tracks

func (p *Provider) Tracks(albumID string) ([]playlist.Track, error)

Tracks returns the tracks for one album item. Results are cached per album id.

type Track

type Track = embyapi.Track

Client and Track alias the shared embyapi types so the provider layer reads naturally and external callers keep using emby.Client.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL