musicbrainz

package
v0.0.0-...-84ee11d Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CoverArtResponse

type CoverArtResponse struct {
	Ext  string
	Data []byte
}

func FetchCoverArt

func FetchCoverArt(mbid string) (CoverArtResponse, error)

type Media

type Media struct {
	Title    string `json:"title"`
	FormatId string `json:"format-id"`
	Position int    `json:"position"`
	Format   string `json:"format"`

	TrackCount  string `json:"track-count"`
	TrackOffset string `json:"track-offset"`

	Tracks []Track `json:"tracks"`
}

type Metadata

type Metadata struct {
	Id    string  `json:"id"`
	Title string  `json:"title"`
	Date  string  `json:"date"`
	Media []Media `json:"media"`

	ArtistCredit []struct {
		Name   string `json:"name"`
		Artist struct {
			Id   string `json:"id"`
			Name string `json:"name"`
			Type string `json:"type"`
		} `json:"arist"`
	} `json:"artist-credit"`
}

func FetchAlbumMetadata

func FetchAlbumMetadata(mbid string) (Metadata, error)

func (*Metadata) DebugDump

func (metadata *Metadata) DebugDump()

type Track

type Track struct {
	Id       string `json:"id"`
	Title    string `json:"title"`
	Number   string `json:"number"`
	Position int    `json:"position"`

	Recording struct {
		ArtistCredit []struct {
			Id   string `json:"id"`
			Name string `json:"name"`
			Type string `json:"type"`
		} `json:"artist-credit"`
		Disambiguation   string `json:"disambiguation"`
		Title            string `json:"title"`
		Length           int    `json:"length"`
		Id               string `json:"id"`
		FirstReleaseDate string `json:"first-release-date"`
		Video            bool   `json:"video"`
	} `json:"recording"`
}

Jump to

Keyboard shortcuts

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