multi

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2026 License: MIT Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package multi joins several servers' libraries into one. Items are tagged with their server and their IDs are qualified as "server:id", so a later call routes back to the server that produced them. Search asks every server; browsing uses the current one.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Library

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

func New

func New() *Library

func (*Library) Add

func (m *Library) Add(s Server, lib library.Library)

Add registers a server. The first one added is current.

func (*Library) AlbumTracks

func (m *Library) AlbumTracks(ctx context.Context, albumID string) ([]library.Track, error)

func (*Library) ArtistAlbums

func (m *Library) ArtistAlbums(ctx context.Context, artistID string) ([]library.Album, error)

func (*Library) ArtistIndex

func (m *Library) ArtistIndex(ctx context.Context) ([]library.Letter, error)

func (*Library) Artists

func (m *Library) Artists(ctx context.Context, offset, limit int) ([]library.Artist, int, error)

func (*Library) Current

func (m *Library) Current() Server

func (*Library) RecentAlbums

func (m *Library) RecentAlbums(ctx context.Context, offset, limit int) ([]library.Album, error)

func (*Library) Search

func (m *Library) Search(ctx context.Context, q string) (library.SearchResult, error)

func (*Library) Servers

func (m *Library) Servers() []Server

func (*Library) SetCurrent

func (m *Library) SetCurrent(id string) bool

func (*Library) Stream

func (m *Library) Stream(ctx context.Context, t library.Track) (library.Stream, error)

type Server

type Server struct {
	ID, Name string
	Owned    bool
	Via      string // "local", "remote", "relay"
}

Jump to

Keyboard shortcuts

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