core

package
v0.51.1 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2024 License: GPL-3.0 Imports: 42 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

Functions

func WriteAfterScanMetrics added in v0.49.0

func WriteAfterScanMetrics(ctx context.Context, dataStore model.DataStore, success bool)

func WriteInitialMetrics added in v0.49.0

func WriteInitialMetrics()

Types

type Archiver

type Archiver interface {
	ZipAlbum(ctx context.Context, id string, format string, bitrate int, w io.Writer) error
	ZipArtist(ctx context.Context, id string, format string, bitrate int, w io.Writer) error
	ZipShare(ctx context.Context, id string, w io.Writer) error
	ZipPlaylist(ctx context.Context, id string, format string, bitrate int, w io.Writer) error
}

func NewArchiver

func NewArchiver(ms MediaStreamer, ds model.DataStore, shares Share) Archiver

type ExternalMetadata added in v0.41.0

type ExternalMetadata interface {
	UpdateAlbumInfo(ctx context.Context, id string) (*model.Album, error)
	UpdateArtistInfo(ctx context.Context, id string, count int, includeNotPresent bool) (*model.Artist, error)
	SimilarSongs(ctx context.Context, id string, count int) (model.MediaFiles, error)
	TopSongs(ctx context.Context, artist string, count int) (model.MediaFiles, error)
	ArtistImage(ctx context.Context, id string) (*url.URL, error)
	AlbumImage(ctx context.Context, id string) (*url.URL, error)
}

func NewExternalMetadata added in v0.41.0

func NewExternalMetadata(ds model.DataStore, agents *agents.Agents) ExternalMetadata

type MediaStreamer

type MediaStreamer interface {
	NewStream(ctx context.Context, id string, reqFormat string, reqBitRate int, offset int) (*Stream, error)
	DoStream(ctx context.Context, mf *model.MediaFile, reqFormat string, reqBitRate int, reqOffset int) (*Stream, error)
}

func NewMediaStreamer

func NewMediaStreamer(ds model.DataStore, t ffmpeg.FFmpeg, cache TranscodingCache) MediaStreamer

type Players

type Players interface {
	Get(ctx context.Context, playerId string) (*model.Player, error)
	Register(ctx context.Context, id, client, typ, ip string) (*model.Player, *model.Transcoding, error)
}

func NewPlayers

func NewPlayers(ds model.DataStore) Players

type Playlists added in v0.47.0

type Playlists interface {
	ImportFile(ctx context.Context, dir string, fname string) (*model.Playlist, error)
	Update(ctx context.Context, playlistID string, name *string, comment *string, public *bool, idsToAdd []string, idxToRemove []int) error
	ImportM3U(ctx context.Context, reader io.Reader) (*model.Playlist, error)
}

func NewPlaylists added in v0.47.0

func NewPlaylists(ds model.DataStore) Playlists

type Share added in v0.44.0

type Share interface {
	Load(ctx context.Context, id string) (*model.Share, error)
	NewRepository(ctx context.Context) rest.Repository
}

func NewShare added in v0.44.0

func NewShare(ds model.DataStore) Share

type Stream

type Stream struct {
	io.ReadCloser
	io.Seeker
	// contains filtered or unexported fields
}

func (*Stream) ContentType

func (s *Stream) ContentType() string

func (*Stream) Duration

func (s *Stream) Duration() float32

func (*Stream) EstimatedContentLength

func (s *Stream) EstimatedContentLength() int

func (*Stream) ModTime

func (s *Stream) ModTime() time.Time

func (*Stream) Name

func (s *Stream) Name() string

func (*Stream) Seekable

func (s *Stream) Seekable() bool

type TranscodingCache

type TranscodingCache cache.FileCache

func GetTranscodingCache

func GetTranscodingCache() TranscodingCache

func NewTranscodingCache added in v0.50.0

func NewTranscodingCache() TranscodingCache

Directories

Path Synopsis
Package playback implements audio playback using PlaybackDevices.
Package playback implements audio playback using PlaybackDevices.
mpv

Jump to

Keyboard shortcuts

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