music

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2023 License: AGPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const FLACPicture = 6

Metadata block body type.

Variables

View Source
var ErrPlaylistNotFound = errors.New("playlist could not be found")

Functions

This section is empty.

Types

type MusicPlayer

type MusicPlayer interface {
	ListPlaylists() []string
	GetPlaylist(name string) (Playlist, error)
	LoadPlaylists(root string) error
	Play()
	Pause()
	Stop()
	Next()
	NowPlaying() SongInfo
	GetChance(name string) (int, error)
}

func NewPlayer

func NewPlayer(name string, cfg *common.Config) (MusicPlayer, error)

type Playlist

type Playlist interface {
	ListSongs() []string
	Next() Song
	Skip()
	GetPosition() int
	// contains filtered or unexported methods
}

type Song

type Song interface {
	GetName() string
	// contains filtered or unexported methods
}

func NewSong

func NewSong(name string, path string) Song

type SongInfo

type SongInfo struct {
	Artist   string
	Title    string
	Playlist string
	Picture  SongPicture
}

type SongPicture

type SongPicture struct {
	Data []byte
	Mime string
}

Jump to

Keyboard shortcuts

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