tagcommon

package
v0.16.4 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FallbackAlbum  = "Unknown Album"
	FallbackArtist = "Unknown Artist"
	FallbackGenre  = "Unknown Genre"
)

Variables

View Source
var ErrUnsupported = errors.New("filetype unsupported")

Functions

func MustAlbum

func MustAlbum(p Info) string

func MustAlbumArtist

func MustAlbumArtist(p Info) string

func MustAlbumArtists

func MustAlbumArtists(p Info) []string

func MustArtist

func MustArtist(p Info) string

func MustArtists added in v0.16.1

func MustArtists(p Info) []string

func MustGenre

func MustGenre(p Info) string

func MustGenres

func MustGenres(p Info) []string

Types

type ChainReader

type ChainReader []Reader

func (ChainReader) CanRead

func (cr ChainReader) CanRead(absPath string) bool

func (ChainReader) Read

func (cr ChainReader) Read(absPath string) (Info, error)

type Info

type Info interface {
	Title() string
	BrainzID() string // musicbrainz recording ID
	Artist() string
	Artists() []string
	Album() string
	AlbumArtist() string
	AlbumArtists() []string
	AlbumBrainzID() string
	Genre() string
	Genres() []string
	TrackNumber() int
	DiscNumber() int
	Length() int
	Bitrate() int
	Year() int
}

type Reader

type Reader interface {
	CanRead(absPath string) bool
	Read(absPath string) (Info, error)
}

Jump to

Keyboard shortcuts

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