Documentation
¶
Overview ¶
Package tag reads and writes audio metadata (tags, cover art, and lyrics) across the formats Shadowbox produces: Opus, MP3, M4A/MP4, and FLAC.
All writers are pure Go so the resulting binary links statically without CGO. Opus and FLAC are handled by rewriting Vorbis comments and embedded pictures directly; MP3 uses ID3v2 frames; MP4 uses iTunes-style atoms.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ErrUnsupportedFormat ¶
type ErrUnsupportedFormat struct{ Ext string }
ErrUnsupportedFormat is returned for file extensions Shadowbox cannot tag.
func (*ErrUnsupportedFormat) Error ¶
func (e *ErrUnsupportedFormat) Error() string
type Metadata ¶
type Metadata struct {
Title string
Artist string
Album string
AlbumArtist string
Date string // year (YYYY)
Genre string
TrackNumber string
TotalTracks string
DiscNumber string
TotalDiscs string
Composer string
Performer string
// Lyrics is plain-text, unsynchronised lyrics.
Lyrics string
// Cover is raw image bytes (JPEG or PNG). CoverMIME describes its type.
Cover []byte
CoverMIME string
}
Metadata holds the tag fields Shadowbox can read or write. Empty fields are left untouched on write where the underlying format allows it.
Click to show internal directories.
Click to hide internal directories.