icecast

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2015 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Directory

type Directory struct {
	XMLName xml.Name `xml:"directory"`
	Entries []Entry  `xml:"entry"`
	// contains filtered or unexported fields
}

Directory represents the XIPH IceCast directory

func New

func New(cacheFile string, typeFilter string) (*Directory, error)

New loads the directory state from disk or network

func (*Directory) SaveCache

func (d *Directory) SaveCache() error

SaveCache stores the filtered list of entries to the cacheFile

func (*Directory) Search

func (d *Directory) Search(search string) []Entry

Search does a string matching of genre tags and title against the search string

type Entry

type Entry struct {
	ServerName  string `xml:"server_name" json:"server_name"`
	ListenURL   string `xml:"listen_url" json:"listen_url"`
	ServerType  string `xml:"server_type" json:"server_type"`
	Bitrate     string `xml:"bitrate" json:"bitrate"`
	Channels    int    `xml:"channels" json:"channels"`
	SampleRate  int    `xml:"samplerate" json:"samplerate"`
	Genre       string `xml:"genre" json:"genre"`
	CurrentSong string `xml:"current_song" json:"current_song"`
}

Entry is one entry of the IceCast directory <entry>

<server_name>Vox Noctem</server_name>
<listen_url>http://r2d2.voxnoctem.com:8000/voxnoctem.mp3</listen_url>
<server_type>audio/mpeg</server_type>
<bitrate>192</bitrate>
<channels>0</channels>
<samplerate>0</samplerate>
<genre>
  80s medieval punk industrial gothic goth electro ebm darkwave
</genre>
<current_song>Infernosounds - Creature Of The Night</current_song>

</entry>

Jump to

Keyboard shortcuts

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