scanner

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2026 License: GPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAlreadyScanning = errors.New("already scanning")
	ErrReadingTags     = errors.New("could not read tags")
)

Functions

func ParseMulti

func ParseMulti(setting MultiValueSetting, values []string, value string) []string

Types

type MultiValueMode

type MultiValueMode uint8
const (
	None MultiValueMode = iota
	Delim
	Multi
)

type MultiValueSetting

type MultiValueSetting struct {
	Mode  MultiValueMode
	Delim string
}

type ScanOptions

type ScanOptions struct {
	IsFull bool
}

type Scanner

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

func New

func New(musicDirs []string, db *db.DB, multiValueSettings map[Tag]MultiValueSetting, tagReader tags.Reader, excludePattern string, scanEmbeddedCover bool) *Scanner

func (*Scanner) ExecuteWatch

func (s *Scanner) ExecuteWatch(ctx context.Context) error

func (*Scanner) IsScanning

func (s *Scanner) IsScanning() bool

func (*Scanner) ScanAndClean

func (s *Scanner) ScanAndClean(opts ScanOptions) (*State, error)

func (*Scanner) StartScanning

func (s *Scanner) StartScanning() bool

func (*Scanner) StopScanning

func (s *Scanner) StopScanning()

type State

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

func (*State) AlbumsMissing

func (s *State) AlbumsMissing() int

func (*State) ArtistsMissing

func (s *State) ArtistsMissing() int

func (*State) BookmarksRemoved

func (s *State) BookmarksRemoved() int

func (*State) GenresMissing

func (s *State) GenresMissing() int

func (*State) SeenAlbums

func (s *State) SeenAlbums() int

func (*State) SeenTracks

func (s *State) SeenTracks() int

func (*State) SeenTracksNew

func (s *State) SeenTracksNew() int

func (*State) TracksMissing

func (s *State) TracksMissing() int

type Tag

type Tag uint8
const (
	Genre Tag = iota
	Artist
	AlbumArtist
)

Jump to

Keyboard shortcuts

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