didl

package
v0.0.0-...-f8e79a6 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenDidl

func GenDidl(di DidlInput) string

Types

type DidlInput

type DidlInput struct {
	Uri    string
	Title  string
	Artist string
	Album  string
}

type DidlItem

type DidlItem struct {
	Title       string  `xml:"dc:title,omitempty"`
	Artist      string  `xml:"upnp:artist,omitempty"`
	Album       string  `xml:"upnp:album,omitempty"`
	AlbumArtUri string  `xml:"upnp:albumArtURI,omitempty"`
	Res         DidlRes `xml:"res"`
}

type DidlLite

type DidlLite struct {
	XMLName xml.Name `xml:"DIDL-Lite"`
	XmlNS   string   `xml:"xmlns,attr"`
	NsUpnp  string   `xml:"xmlns:upnp,attr"`
	NsDc    string   `xml:"xmlns:dc,attr"`
	NsDlna  string   `xml:"xmlns:dlna,attr"`
	Item    DidlItem `xml:"item"`
}

type DidlRes

type DidlRes struct {
	Size      int    `xml:"size,attr,omitempty"`
	Duration  string `xml:"duration,attr,omitempty"`
	ProtoInfo string `xml:"protocolInfo,attr"`
	Uri       string `xml:",chardata"`
}

Jump to

Keyboard shortcuts

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