v24

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.4 tag frame header.

View Source
const HeaderSize = 10

HeaderSize is size of ID3v2.4 tag header.

Variables

View Source
var DeclaredFrames = map[string]DeclaredFrame{
	"AENC": {"AENC", "Audio encryption", TypeUnknown},
	"APIC": {"APIC", "Attached picture", TypeAttachedPicture},
	"ASPI": {"ASPI", "Audio seek point index", TypeUnknown},
	"COMM": {"COMM", "Comments", TypeUnknown},
	"COMR": {"COMR", "Commercial frame", TypeUnknown},
	"ENCR": {"ENCR", "Encryption method registration", TypeUnknown},
	"EQU2": {"EQU2", "Equalisation (2)", TypeUnknown},
	"ETCO": {"ETCO", "Event timing codes", TypeUnknown},
	"GEOB": {"GEOB", "General encapsulated object", TypeUnknown},
	"GRID": {"GRID", "Group identification registration", 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", TypePopularimeter},
	"POSS": {"POSS", "Position synchronisation frame", TypeUnknown},
	"RBUF": {"RBUF", "Recommended buffer size", TypeUnknown},
	"RVA2": {"RVA2", "Relative volume adjustment (2)", TypeUnknown},
	"RVRB": {"RVRB", "Reverb", TypeUnknown},
	"SEEK": {"SEEK", "Seek frame", TypeUnknown},
	"SIGN": {"SIGN", "Signature frame", TypeUnknown},
	"SYLT": {"SYLT", "Synchronised lyric/text", TypeUnknown},
	"SYTC": {"SYTC", "Synchronised 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},
	"TDEN": {"TDEN", "Encoding time", TypeTextInformation},
	"TDLY": {"TDLY", "Playlist delay", TypeTextInformation},
	"TDOR": {"TDOR", "Original release time", TypeTextInformation},
	"TDRC": {"TDRC", "Recording time", TypeTextInformation},
	"TDRL": {"TDRL", "Release time", TypeTextInformation},
	"TDTG": {"TDTG", "Tagging time", TypeTextInformation},
	"TENC": {"TENC", "Encoded by", TypeTextInformation},
	"TEXT": {"TEXT", "Lyricist/Text writer", TypeTextInformation},
	"TFLT": {"TFLT", "File type", TypeTextInformation},
	"TIPL": {"TIPL", "Involved people list", 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},
	"TMCL": {"TMCL", "Musician credits list", TypeTextInformation},
	"TMED": {"TMED", "Media type", TypeTextInformation},
	"TMOO": {"TMOO", "Mood", 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},
	"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},
	"TPRO": {"TPRO", "Produced notice", TypeTextInformation},
	"TPUB": {"TPUB", "Publisher", TypeTextInformation},
	"TRCK": {"TRCK", "Track number/Position in set", TypeTextInformation},
	"TRSN": {"TRSN", "Internet radio station name", TypeTextInformation},
	"TRSO": {"TRSO", "Internet radio station owner", TypeTextInformation},
	"TSOA": {"TSOA", "Album sort order", TypeTextInformation},
	"TSOP": {"TSOP", "Performer sort order", TypeTextInformation},
	"TSOT": {"TSOT", "Title sort order", TypeTextInformation},
	"TSRC": {"TSRC", "ISRC (international standard recording code)", TypeTextInformation},
	"TSSE": {"TSSE", "Software/Hardware and settings used for encoding", TypeTextInformation},
	"TSST": {"TSST", "Set subtitle", TypeTextInformation},

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

	"UFID": {"UFID", "Unique file identifier", TypeUnknown},
	"USER": {"USER", "Terms of use", TypeUnknown},
	"USLT": {"USLT", "Unsynchronised lyric/text transcription", TypeUnknown},
	"WCOM": {"WCOM", "Commercial information", TypeUnknown},
	"WCOP": {"WCOP", "Copyright/Legal information", TypeUnknown},
	"WOAF": {"WOAF", "Official audio file webpage", TypeUnknown},
	"WOAR": {"WOAR", "Official artist/performer webpage", TypeUnknown},
	"WOAS": {"WOAS", "Official audio source webpage", TypeUnknown},
	"WORS": {"WORS", "Official Internet radio station homepage", TypeUnknown},
	"WPAY": {"WPAY", "Payment", TypeUnknown},
	"WPUB": {"WPUB", "Publishers official webpage", TypeUnknown},
	"WXXX": {"WXXX", "User defined URL link frame", TypeUnknown},

	"TCMP": {"TCMP", "Part of a compilation", TypeUnknown},
}
View Source
var ErrTagNotFound = errors.New("no id3v2.4.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
	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 PopularimeterFrame

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

4.18. Popularimeter.

func (PopularimeterFrame) Counter

func (f PopularimeterFrame) Counter() int

func (PopularimeterFrame) EmailToUser

func (f PopularimeterFrame) EmailToUser() string

func (PopularimeterFrame) ID

func (f PopularimeterFrame) ID() string

func (PopularimeterFrame) Rating

func (f PopularimeterFrame) Rating() uint8

func (PopularimeterFrame) Size

func (f PopularimeterFrame) Size() int

type Tag

type Tag struct {
	Size                      int
	UnsynchronisationFlag     bool
	ExtendedHeaderFlag        bool
	ExperimentalIndicatorFlag bool
	FooterPresentFlag         bool
	// contains filtered or unexported fields
}

Tag is ID3v2.4 tag reader.

func New

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

New will read file and return id3v2.4 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

Jump to

Keyboard shortcuts

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