library

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2026 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsAudio

func IsAudio(path string) bool

IsAudio reports whether the path is a supported audio file (including archive entries).

func OpenArchiveRoot

func OpenArchiveRoot(path string) (string, bool)

OpenArchiveRoot returns an archive URI for the root of the archive if the path is a supported archive file.

Types

type Entry

type Entry struct {
	Name      string
	Path      string
	IsDir     bool
	IsArchive bool
	IsAudio   bool
}

Entry represents a browsable item.

func List

func List(path string, showHidden bool) ([]Entry, error)

List returns directory or archive entries filtered to audio files, archives, and directories.

type Metadata

type Metadata struct {
	Artist      string
	Title       string
	Album       string
	AlbumArtist string
	Composer    string
	Genre       string
	Year        int
	Comment     string
	Lyrics      string
	Duration    time.Duration
	Picture     *Picture
}

Metadata captures audio tags for display.

func ReadMetadataBasic

func ReadMetadataBasic(path string) (Metadata, error)

ReadMetadataBasic reads basic audio tags (artist/title/album).

func ReadMetadataExtended

func ReadMetadataExtended(path string) (Metadata, error)

ReadMetadataExtended reads all supported audio tags (including artwork).

type Picture

type Picture struct {
	MIMEType    string
	Type        string
	Description string
	Data        []byte
}

Picture captures embedded album artwork data.

type TrackInfo

type TrackInfo struct {
	Path   string
	Name   string
	Artist string
	Title  string
	Album  string
}

TrackInfo is a minimal view of track fields used for metadata enrichment.

Jump to

Keyboard shortcuts

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