scan

package
v0.0.0-...-bea0a05 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2025 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxConcurrency = 8
)

Variables

This section is empty.

Functions

func MusicDocWalker

func MusicDocWalker(ctx context.Context,
	musicRoot string,
	wgProcess *errgroup.Group,
	fileTypes ...types.FileFormatType,
) (<-chan types.SongDocument, <-chan Folder, <-chan CueSheet, error)

func ToSongDocument

func ToSongDocument(si *types.SongInfo) types.SongDocument

Types

type CueSheet

type CueSheet struct {
	FilePath  string
	Ancestors []string
}

type CueTrack

type CueTrack struct {
	Title    string
	Artist   string
	Number   uint
	StartPos time.Duration
	Duration time.Duration
}

type CueTrackDecoder

type CueTrackDecoder struct{}

func (*CueTrackDecoder) Decode

func (d *CueTrackDecoder) Decode(file string) ([]types.SongInfo, error)

type FlacTagDecoder

type FlacTagDecoder struct{}

func (*FlacTagDecoder) Decode

func (d *FlacTagDecoder) Decode(file string) (*types.SongInfo, error)

type Folder

type Folder struct {
	FilePath  string
	Ancestors []string
}

type Mp3TagDecoder

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

func (*Mp3TagDecoder) Decode

func (d *Mp3TagDecoder) Decode(fileName string) (*types.SongInfo, error)

type MusicTagDecoder

type MusicTagDecoder interface {
	Decode(fileName string) (*types.SongInfo, error)
}

type OggTagDecoder

type OggTagDecoder struct{}

func (*OggTagDecoder) Decode

func (d *OggTagDecoder) Decode(file string) (*types.SongInfo, error)

Jump to

Keyboard shortcuts

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