tracks

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2026 License: GPL-3.0 Imports: 10 Imported by: ? 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

Index

Constants

View Source
const MaxTracksInContext = 32

Variables

This section is empty.

Functions

func ContextTrackComparator

func ContextTrackComparator(typ librespot.SpotifyIdType, target *connectpb.ContextTrack) func(*connectpb.ContextTrack) bool

func ProvidedTrackComparator

func ProvidedTrackComparator(typ librespot.SpotifyIdType, target *connectpb.ProvidedTrack) func(*connectpb.ContextTrack) bool

Types

type List

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

func NewTrackListFromContext

func NewTrackListFromContext(ctx context.Context, log_ librespot.Logger, sp *spclient.Spclient, spotCtx *connectpb.Context) (_ *List, err error)

func (*List) AddToQueue

func (tl *List) AddToQueue(track *connectpb.ContextTrack)

func (*List) AllTracks added in v0.1.1

func (tl *List) AllTracks(ctx context.Context) []*connectpb.ProvidedTrack

func (*List) CurrentTrack

func (tl *List) CurrentTrack() *connectpb.ProvidedTrack

func (*List) GoNext

func (tl *List) GoNext(ctx context.Context) bool

func (*List) GoPrev

func (tl *List) GoPrev() bool

func (*List) GoStart

func (tl *List) GoStart(ctx context.Context) bool

func (*List) Index

func (tl *List) Index() *connectpb.ContextIndex

func (*List) Metadata

func (tl *List) Metadata() map[string]string

func (*List) NextTracks

func (tl *List) NextTracks(ctx context.Context, nextHint []*connectpb.ContextTrack) []*connectpb.ProvidedTrack

func (*List) PeekNext

func (tl *List) PeekNext(ctx context.Context) *connectpb.ContextTrack

func (*List) PrevTracks

func (tl *List) PrevTracks() []*connectpb.ProvidedTrack

func (*List) Seek

func (tl *List) Seek(ctx context.Context, f func(*connectpb.ContextTrack) bool) error

func (*List) SetPlayingQueue

func (tl *List) SetPlayingQueue(val bool)

func (*List) SetQueue

func (tl *List) SetQueue(_ []*connectpb.ContextTrack, next []*connectpb.ContextTrack)

func (*List) ToggleShuffle

func (tl *List) ToggleShuffle(ctx context.Context, shuffle bool) error

func (*List) TrySeek

func (tl *List) TrySeek(ctx context.Context, f func(track *connectpb.ContextTrack) bool) error

Jump to

Keyboard shortcuts

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