MetaResolver

package
v0.0.0-...-b8436b2 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsSupportedExt

func IsSupportedExt(ext string) bool

IsSupportedExt checks if a file extension is a supported audio format.

params:
      ext: file extension including the dot (e.g. ".mp3")
returns:
      bool

TODO: replace hardcoded format resolver with accurate tag

Types

type TrackMeta

type TrackMeta struct {
	Path      string `json:"path"`
	Title     string `json:"title"`
	Artist    string `json:"artist"`
	Album     string `json:"album"`
	Format    string `json:"format"`
	CoverData []byte `json:"-"` // raw cover art bytes (JPEG/PNG), excluded from JSON
}

func ResolveTrack

func ResolveTrack(path string) TrackMeta

ResolveTrack reads metadata from a single audio file.

params:
      path: absolute path to the audio file
returns:
      TrackMeta: populated metadata (falls back to filename if tags are missing)

func ScanFolder

func ScanFolder(folder string) ([]TrackMeta, error)

ScanFolder reads a directory and returns metadata for all supported audio files.

params:
      folder: absolute path to the music directory
returns:
      []TrackMeta: metadata for each audio file found
      error

Jump to

Keyboard shortcuts

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