Documentation
¶
Index ¶
Constants ¶
const Version = "0.0.3"
Variables ¶
var Revision = "HEAD"
Functions ¶
This section is empty.
Types ¶
type Chapter ¶
Chapter represents a single chapter with start time and title
func (*Chapter) MarshalYAML ¶
MarshalYAML marshals the chapter to YAML format
func (*Chapter) UnmarshalYAML ¶
UnmarshalYAML unmarshals the chapter from YAML format
type Metadata ¶
type Metadata struct {
Title string `yaml:"title"` // TIT2 tag (Title/songname/content description)
Subtitle string `yaml:"subtitle,omitempty"` // TIT3 tag (Subtitle/Description refinement)
Artist string `yaml:"artist"` // TPE1 tag (Lead performer(s)/Soloist(s))
Album string `yaml:"album"` // TALB tag (Album/Movie/Show title)
AlbumArtist string `yaml:"albumArtist,omitempty"` // TPE2 tag (Band/orchestra/accompaniment)
Grouping string `yaml:"grouping,omitempty"` // TIT1 tag (Content group description)
Date *Timestamp `yaml:"date,omitempty"` // TDRC tag for ID3v2.4 (Recording time)
Track *NumberInSet `yaml:"track,omitempty"` // TRCK tag (Track number/Position in set)
Disc *NumberInSet `yaml:"disc,omitempty"` // TPOS tag (Part of a set)
Genre string `yaml:"genre,omitempty"` // TCON tag (Content type/Genre)
Comment string `yaml:"comment,omitempty"` // COMM tag (Comments)
Composer string `yaml:"composer,omitempty"` // TCOM tag (Composer)
Publisher string `yaml:"publisher,omitempty"` // TPUB tag (Publisher)
Copyright string `yaml:"copyright,omitempty"` // TCOP tag (Copyright message)
Language string `yaml:"language,omitempty"` // TLAN tag (Language(s))
BPM int `yaml:"bpm,omitempty"` // TBPM tag (BPM - Beats per minute)
Chapters []*Chapter `yaml:"chapters,omitempty"` // CHAP tag (Chapter frames)
Artwork string `yaml:"artwork,omitempty"` // APIC tag (Attached picture)
Lyrics string `yaml:"lyrics,omitempty"` // USLT tag (Unsynchronised lyric/text transcription)
}
Metadata represents the metadata of an MP3 file
type NumberInSet ¶
NumberInSet represents a current/total number pair in ID3v2 format (e.g., "3/10", "1/2")
func (*NumberInSet) MarshalYAML ¶
func (n *NumberInSet) MarshalYAML() ([]byte, error)
MarshalYAML marshals number in set to YAML format
func (*NumberInSet) String ¶
func (n *NumberInSet) String() string
String returns number in set in ID3v2 format
func (*NumberInSet) UnmarshalYAML ¶
func (n *NumberInSet) UnmarshalYAML(b []byte) error
UnmarshalYAML unmarshals number in set from YAML format
type Timestamp ¶
Timestamp wraps time.Time for ID3v2 timestamp format as defined in ID3v2.4.0-structure. The timestamp fields are based on a subset of ISO 8601 and can have varying levels of precision. All time stamps are UTC. Valid formats: yyyy, yyyy-MM, yyyy-MM-dd, yyyy-MM-ddTHH, yyyy-MM-ddTHH:mm, yyyy-MM-ddTHH:mm:ss
func (*Timestamp) MarshalYAML ¶
MarshalYAML marshals timestamp to YAML format
func (*Timestamp) UnmarshalYAML ¶
UnmarshalYAML unmarshals timestamp from YAML format