v23

package
v0.0.0-...-bab0e55 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2021 License: GPL-3.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

View Source
const FrameHeaderSize = 10

FrameHeaderSize is size of ID3v2.3 tag frame header.

View Source
const HeaderSize = 10

HeaderSize is size of ID3v2.3 tag header.

Variables

View Source
var DeclaredFrames = map[string]DeclaredFrame{
	"AENC": {"AENC", "Audio encryption", TypeUnknown},
	"APIC": {"APIC", "Attached picture", TypeAttachedPicture},
	"COMM": {"COMM", "Comments", TypeComments},
	"COMR": {"COMR", "Commercial frame", TypeUnknown},
	"ENCR": {"ENCR", "Encryption method registration", TypeUnknown},
	"EQUA": {"EQUA", "Equalization", TypeUnknown},
	"ETCO": {"ETCO", "Event timing codes", TypeUnknown},
	"GEOB": {"GEOB", "General encapsulated object", TypeUnknown},
	"GRID": {"GRID", "Group identification registration", TypeUnknown},
	"IPLS": {"IPLS", "Involved people list", TypeUnknown},
	"LINK": {"LINK", "Linked information", TypeUnknown},
	"MCDI": {"MCDI", "Music CD identifier", TypeUnknown},
	"MLLT": {"MLLT", "MPEG location lookup table", TypeUnknown},
	"OWNE": {"OWNE", "Ownership frame", TypeUnknown},
	"PRIV": {"PRIV", "Private frame", TypeUnknown},
	"PCNT": {"PCNT", "Play counter", TypeUnknown},
	"POPM": {"POPM", "Popularimeter", TypeUnknown},
	"POSS": {"POSS", "Position synchronisation frame", TypeUnknown},
	"RBUF": {"RBUF", "Recommended buffer size", TypeUnknown},
	"RVAD": {"RVAD", "Relative volume adjustment", TypeUnknown},
	"RVRB": {"RVRB", "Reverb", TypeUnknown},
	"SYLT": {"SYLT", "Synchronized lyric/text", TypeUnknown},
	"SYTC": {"SYTC", "Synchronized tempo codes", TypeUnknown},

	"TALB": {"TALB", "Album/Movie/Show title", TypeTextInformation},
	"TBPM": {"TBPM", "BPM (beats per minute)", TypeTextInformation},
	"TCOM": {"TCOM", "Composer", TypeTextInformation},
	"TCON": {"TCON", "Content type", TypeTextInformation},
	"TCOP": {"TCOP", "Copyright message", TypeTextInformation},
	"TDAT": {"TDAT", "Date", TypeTextInformation},
	"TDLY": {"TDLY", "Playlist delay", TypeTextInformation},
	"TENC": {"TENC", "Encoded by", TypeTextInformation},
	"TEXT": {"TEXT", "Lyricist/Text writer", TypeTextInformation},
	"TFLT": {"TFLT", "File type", TypeTextInformation},
	"TIME": {"TIME", "Time", TypeTextInformation},
	"TIT1": {"TIT1", "Content group description", TypeTextInformation},
	"TIT2": {"TIT2", "Title/songname/content description", TypeTextInformation},
	"TIT3": {"TIT3", "Subtitle/Description refinement", TypeTextInformation},
	"TKEY": {"TKEY", "Initial key", TypeTextInformation},
	"TLAN": {"TLAN", "Language(s)", TypeTextInformation},
	"TLEN": {"TLEN", "Length", TypeTextInformation},
	"TMED": {"TMED", "Media type", TypeTextInformation},
	"TOAL": {"TOAL", "Original album/movie/show title", TypeTextInformation},
	"TOFN": {"TOFN", "Original filename", TypeTextInformation},
	"TOLY": {"TOLY", "Original lyricist(s)/text writer(s)", TypeTextInformation},
	"TOPE": {"TOPE", "Original artist(s)/performer(s)", TypeTextInformation},
	"TORY": {"TORY", "Original release year", TypeTextInformation},
	"TOWN": {"TOWN", "File owner/licensee", TypeTextInformation},
	"TPE1": {"TPE1", "Lead performer(s)/Soloist(s)", TypeTextInformation},
	"TPE2": {"TPE2", "Band/orchestra/accompaniment", TypeTextInformation},
	"TPE3": {"TPE3", "Conductor/performer refinement", TypeTextInformation},
	"TPE4": {"TPE4", "Interpreted, remixed, or otherwise modified by", TypeTextInformation},
	"TPOS": {"TPOS", "Part of a set", TypeTextInformation},
	"TPUB": {"TPUB", "Publisher", TypeTextInformation},
	"TRCK": {"TRCK", "Track number/Position in set", TypeTextInformation},
	"TRDA": {"TRDA", "Recording dates", TypeTextInformation},
	"TRSN": {"TRSN", "Internet radio station name", TypeTextInformation},
	"TRSO": {"TRSO", "Internet radio station owner", TypeTextInformation},
	"TSIZ": {"TSIZ", "Size", TypeTextInformation},
	"TSRC": {"TSRC", "ISRC (international standard recording code)", TypeTextInformation},
	"TSSE": {"TSSE", "Software/Hardware and settings used for encoding", TypeTextInformation},
	"TYER": {"TYER", "Year", TypeTextInformation},

	"TXXX": {"TXXX", "User defined text information frame", TypeUserDefinedTextInformation},

	"UFID": {"UFID", "Unique file identifier", TypeUnknown},
	"USER": {"USER", "Terms of use", TypeTermOfUse},
	"USLT": {"USLT", "Unsychronized lyric/text transcription", TypeUnsychronisedLyricsOrTextTranscription},

	"WCOM": {"WCOM", "Commercial information", TypeURLLink},
	"WCOP": {"WCOP", "Copyright/Legal information", TypeURLLink},
	"WOAF": {"WOAF", "Official audio file webpage", TypeURLLink},
	"WOAR": {"WOAR", "Official artist/performer webpage", TypeURLLink},
	"WOAS": {"WOAS", "Official audio source webpage", TypeURLLink},
	"WORS": {"WORS", "Official internet radio station homepage", TypeURLLink},
	"WPAY": {"WPAY", "Payment", TypeURLLink},
	"WPUB": {"WPUB", "Publishers official webpage", TypeURLLink},

	"WXXX": {"WXXX", "User defined URL link frame", TypeUserDefinedURLLink},

	"TCMP": {"TCMP", "Part of a compilation", TypeUnknown},

	"WFED": {"WFED", "Podcast URL", TypeURLLink},
}
View Source
var ErrTagNotFound = errors.New("no id3v2.3.0 tag found")

Functions

This section is empty.

Types

type AttachedPictureFrame

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

func (AttachedPictureFrame) Description

func (f AttachedPictureFrame) Description() string

func (AttachedPictureFrame) ID

func (f AttachedPictureFrame) ID() string

func (AttachedPictureFrame) Image

func (f AttachedPictureFrame) Image() (image.Image, error)

func (AttachedPictureFrame) Size

func (f AttachedPictureFrame) Size() int

type CommentsFrame

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

func (CommentsFrame) ID

func (f CommentsFrame) ID() string

func (CommentsFrame) Language

func (f CommentsFrame) Language() string

func (CommentsFrame) ShortContentDescription

func (f CommentsFrame) ShortContentDescription() string

func (CommentsFrame) Size

func (f CommentsFrame) Size() int

func (CommentsFrame) TheActualText

func (f CommentsFrame) TheActualText() string

type DeclaredFrame

type DeclaredFrame struct {
	ID          string
	Description string
	Type        FrameType
}

type EventTimingCodesFrame

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

func (EventTimingCodesFrame) ID

func (f EventTimingCodesFrame) ID() string

func (EventTimingCodesFrame) Size

func (f EventTimingCodesFrame) Size() int

func (EventTimingCodesFrame) TimeStampFormat

func (f EventTimingCodesFrame) TimeStampFormat() TimeStampFormat

type Frame

type Frame interface {
	ID() string
	Size() int
}

type FrameType

type FrameType int
const (
	TypeUnknown FrameType = iota
	TypeUniqueFileIdentifier
	TypeTextInformation
	TypeUserDefinedTextInformation
	TypeURLLink
	TypeUserDefinedURLLink
	TypeInvolvedPeopleList
	TypeMusicCDIdentifier
	TypeEventTimingCodes
	TypeMPEGLocationLookupTable
	TypeSyncedTempoCodes
	TypeUnsychronisedLyricsOrTextTranscription
	TypeSynchronisedLyricsOrText
	TypeComments
	TypeRelativeVolumeAdjustment
	TypeEqualisation
	TypeReverb
	TypeAttachedPicture
	TypeGeneralEncapsulatedObject
	TypePlayCounter
	TypePopularimeter
	TypeRecommendedBufferSize
	TypeEncryptedMetaFrame
	TypeAudioEncryption
	TypeLinkedInformation

	TypeTermOfUse
)

type InvolvedPeopleListFrame

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

func (InvolvedPeopleListFrame) ID

func (f InvolvedPeopleListFrame) ID() string

func (InvolvedPeopleListFrame) PeopleList

func (f InvolvedPeopleListFrame) PeopleList() []string

func (InvolvedPeopleListFrame) Size

func (f InvolvedPeopleListFrame) Size() int

type MusicCDIdentifierFrame

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

func (MusicCDIdentifierFrame) CDTOC

func (f MusicCDIdentifierFrame) CDTOC() []byte

func (MusicCDIdentifierFrame) ID

func (f MusicCDIdentifierFrame) ID() string

func (MusicCDIdentifierFrame) Size

func (f MusicCDIdentifierFrame) Size() int

type PictureType

type PictureType int
const (
	PictureTypeOther PictureType = iota
	PictureType32x32
	PictureTypeOtherFileIcon
	PictureTypeCoverFront
	PictureTypeCoverBack
	PictureTypeLeafletPage
	PictureTypeMedia
	PictureTypeLeadArtist
	PictureTypeArtist
	PictureTypeConductor
	PictureTypeBandOrOrchestra
	PictureTypeComposer
	PictureTypeLyricist
	PictureTypeRecordingLocation
	PictureTypeDuringRecording
	PictureTypeDuringPerformance
	PictureTypeMovieOrVideoScreenCapture
	PictureTypeABrightColouredFish
	PictureTypeIllustration
	PictureTypeBandOrArtistLogotype
	PictureTypePublisherOrStudioLogotype
)

type Tag

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

Tag is ID3v2.3 tag reader.

func New

func New(f io.ReadSeeker) (*Tag, error)

New will read file and return id3v2.3 tag reader.

func (Tag) Album

func (tag Tag) Album() string

func (Tag) AlbumArtists

func (tag Tag) AlbumArtists() []string

func (Tag) Artists

func (tag Tag) Artists() []string

func (Tag) AttachedPictures

func (tag Tag) AttachedPictures() []AttachedPictureFrame

func (Tag) Frames

func (tag Tag) Frames(ids ...string) []Frame

func (Tag) Genres

func (tag Tag) Genres() []string

func (Tag) Title

func (tag Tag) Title() string

func (Tag) TrackNumberAndPosition

func (tag Tag) TrackNumberAndPosition() (int, int)

func (Tag) Year

func (tag Tag) Year() string

type TermOfUseFrame

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

func (TermOfUseFrame) ID

func (f TermOfUseFrame) ID() string

func (TermOfUseFrame) Language

func (f TermOfUseFrame) Language() string

func (TermOfUseFrame) Size

func (f TermOfUseFrame) Size() int

func (TermOfUseFrame) TheActualText

func (f TermOfUseFrame) TheActualText() string

type TextInformationFrame

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

func (TextInformationFrame) ID

func (f TextInformationFrame) ID() string

func (TextInformationFrame) Size

func (f TextInformationFrame) Size() int

func (TextInformationFrame) Text

func (f TextInformationFrame) Text() string

type TimeStampFormat

type TimeStampFormat byte

type URLLinkFrame

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

func (URLLinkFrame) ID

func (f URLLinkFrame) ID() string

func (URLLinkFrame) Size

func (f URLLinkFrame) Size() int

func (URLLinkFrame) URL

func (f URLLinkFrame) URL() string

type UniqueFileIdentifierFrame

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

func (UniqueFileIdentifierFrame) ID

func (f UniqueFileIdentifierFrame) ID() string

func (UniqueFileIdentifierFrame) Identifier

func (f UniqueFileIdentifierFrame) Identifier() []byte

func (UniqueFileIdentifierFrame) OwnerIdentifier

func (f UniqueFileIdentifierFrame) OwnerIdentifier() string

func (UniqueFileIdentifierFrame) Size

func (f UniqueFileIdentifierFrame) Size() int

type UnknownFrame

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

func (UnknownFrame) Data

func (f UnknownFrame) Data() []byte

func (UnknownFrame) ID

func (f UnknownFrame) ID() string

func (UnknownFrame) Size

func (f UnknownFrame) Size() int

type UnsynchronisedLyricsOrTextTranscriptionFrame

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

func (UnsynchronisedLyricsOrTextTranscriptionFrame) ContentDescriptor

func (UnsynchronisedLyricsOrTextTranscriptionFrame) ID

func (f UnsynchronisedLyricsOrTextTranscriptionFrame) ID() string

func (UnsynchronisedLyricsOrTextTranscriptionFrame) Language

func (UnsynchronisedLyricsOrTextTranscriptionFrame) LyricsOrText

func (UnsynchronisedLyricsOrTextTranscriptionFrame) Size

func (f UnsynchronisedLyricsOrTextTranscriptionFrame) Size() int

type UserDefinedTextInformationFrame

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

func (UserDefinedTextInformationFrame) Description

func (f UserDefinedTextInformationFrame) Description() string

func (UserDefinedTextInformationFrame) ID

func (f UserDefinedTextInformationFrame) ID() string

func (UserDefinedTextInformationFrame) Size

func (f UserDefinedTextInformationFrame) Size() int

func (UserDefinedTextInformationFrame) Value

type UserDefinedURLLinkFrame

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

func (UserDefinedURLLinkFrame) Description

func (f UserDefinedURLLinkFrame) Description() string

func (UserDefinedURLLinkFrame) ID

func (f UserDefinedURLLinkFrame) ID() string

func (UserDefinedURLLinkFrame) Size

func (f UserDefinedURLLinkFrame) Size() int

func (UserDefinedURLLinkFrame) URL

Jump to

Keyboard shortcuts

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