files

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2025 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnconfigured = errors.New("unconfigured usage")
)

Functions

This section is empty.

Types

type Files

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

func Init

func Init(logger *slog.Logger, path string, lib Library) (*Files, error)

func (*Files) Run

func (f *Files) Run(ctx context.Context) error

func (*Files) Stream

func (f *Files) Stream(path string) (io.ReadSeekCloser, error)

type Library

type Library interface {
	GetFileTrack(ctx context.Context, path string) (library.Track, error)
	GetAllFileTracks(ctx context.Context) ([]library.Track, error)
	SyncFileTrack(ctx context.Context, track TrackFull) error
	DeleteFileTrack(ctx context.Context, id uuid.UUID) error
	GetLastRun(ctx context.Context) (time.Time, error)
	SetLastRun(ctx context.Context, ts time.Time) error
}

type TrackFull

type TrackFull struct {
	Path         string
	Title        string
	Num          int
	Disc         int
	Artists      []string
	AlbumArtists []string
	Album        string
	Duration     time.Duration
	Image        []byte
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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