library

package
v0.0.0-...-8b9c840 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Album

type Album struct {
	Name string
	// Tracks holds track titles as keys for fast lookups
	// Track titles are formated as 'TrackNo - TrackTitle'
	Tracks map[string]struct{}
}

func NewAlbum

func NewAlbum(albumName, trackName string) *Album

type Artist

type Artist struct {
	Name   string
	Albums map[string]*Album
}

type Library

type Library struct {
	Root    string
	Artists map[string]*Artist
	sync.Mutex
}

func LoadLibrary

func LoadLibrary(root string) (*Library, error)

func (*Library) FileMarkStored

func (l *Library) FileMarkStored(t *Track, filename string) error

Unhide the file now that its finished

func (*Library) MarkStored

func (l *Library) MarkStored(t *Track)

func (*Library) Stored

func (l *Library) Stored(t *Track) bool

func (*Library) String

func (l *Library) String() string

func (*Library) UnmarkStored

func (l *Library) UnmarkStored(t *Track)

func (*Library) Watch

func (l *Library) Watch(ctx context.Context) error

type Track

type Track struct {
	Title       string
	Artist      string
	Album       string
	TrackNumber int32
	Length      time.Duration
	Format      string
}

func (*Track) RelPath

func (t *Track) RelPath() string

func (*Track) String

func (t *Track) String() string

Jump to

Keyboard shortcuts

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