tag

package
v0.0.5-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFromNCM

func NewFromNCM(n *ncm.NCM, filename string) error

func SetMetadata

func SetMetadata(tag Tagger, imgData []byte, meta *ncm.MetadataMusic) error

Types

type Flac

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

func NewFlac

func NewFlac(filename string) (*Flac, error)

func (*Flac) Save

func (f *Flac) Save() error

func (*Flac) SetAlbum

func (f *Flac) SetAlbum(album string) error

func (*Flac) SetArtist

func (f *Flac) SetArtist(artists []string) error

func (*Flac) SetComment

func (f *Flac) SetComment(comment string) error

func (*Flac) SetCover

func (f *Flac) SetCover(buf []byte, mime string) error

func (*Flac) SetCoverUrl

func (f *Flac) SetCoverUrl(coverUrl string) error

func (*Flac) SetTitle

func (f *Flac) SetTitle(title string) error

type Mp3

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

func NewMp3

func NewMp3(path string) (*Mp3, error)

func (*Mp3) Save

func (m *Mp3) Save() error

func (*Mp3) SetAlbum

func (m *Mp3) SetAlbum(album string) error

func (*Mp3) SetArtist

func (m *Mp3) SetArtist(artists []string) error

func (*Mp3) SetComment

func (m *Mp3) SetComment(comment string) error

func (*Mp3) SetCover

func (m *Mp3) SetCover(buf []byte, mime string) error

func (*Mp3) SetCoverUrl

func (m *Mp3) SetCoverUrl(coverUrl string) error

func (*Mp3) SetTitle

func (m *Mp3) SetTitle(title string) error

type Tagger

type Tagger interface {
	SetCover(buf []byte, mime string) error
	SetCoverUrl(coverUrl string) error
	SetTitle(string) error
	SetAlbum(string) error
	SetArtist([]string) error
	SetComment(string) error
	Save() error // must be called
}

Tagger interface for both mp3 and flac

func New

func New(filename, format string) (Tagger, error)

type WAV

type WAV struct {
}

func NewWAV

func NewWAV(path string) (*WAV, error)

func (*WAV) Save

func (m *WAV) Save() error

func (*WAV) SetAlbum

func (m *WAV) SetAlbum(album string) error

func (*WAV) SetArtist

func (m *WAV) SetArtist(artists []string) error

func (*WAV) SetComment

func (m *WAV) SetComment(comment string) error

func (*WAV) SetCover

func (m *WAV) SetCover(buf []byte, mime string) error

func (*WAV) SetCoverUrl

func (m *WAV) SetCoverUrl(coverUrl string) error

func (*WAV) SetTitle

func (m *WAV) SetTitle(title string) error

Jump to

Keyboard shortcuts

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