xspf

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	XmlVersion  = "1"
	Xmlns       = "http://xspf.org/ns/0/"
	ContentType = "application/xspf+xml"
)

Variables

This section is empty.

Functions

func BufferedGenerate

func BufferedGenerate(list *PlayList) (*bytes.Buffer, error)

func EncodeXspf added in v0.3.0

func EncodeXspf(w io.Writer, list *PlayList) error

func Generate

func Generate(w io.Writer, list *PlayList) error

Types

type PlayList

type PlayList struct {
	Title      string   `xml:"title,omitempty"`
	Creator    string   `xml:"creator,omitempty"`
	Date       string   `xml:"date,omitempty"`
	Annotation string   `xml:"annotation,omitempty"`
	Tracks     []*Track `xml:"trackList>track"`
}

type Track

type Track struct {
	Location   string `xml:"location"`
	Title      string `xml:"title,omitempty"`
	Creator    string `xml:"creator,omitempty"`
	Album      string `xml:"album,omitempty"`
	TrackNum   string `xml:"trackNum,omitempty"`
	Duration   string `xml:"duration,omitempty"`
	ImageExt   string `xml:"-"`
	Image      string `xml:"image,omitempty"`
	Annotation string `xml:"annotation,omitempty"`
}

Jump to

Keyboard shortcuts

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