Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct { Requesting bool `json:"requesting"` Listeners int `json:"listeners"` CurrentTime int64 `json:"current"` StartTime int64 `json:"start_time"` EndTime int64 `json:"end_time"` NowPlaying string `json:"np"` Thread string `json:"thread"` DJ struct { ID int `json:"id"` Image string `json:"djimage"` Name string `json:"djname"` } `json:"dj"` Queue []Song `json:"queue"` LastPlayed []Song `json:"lp"` }
Data retrieved from the JSON API
type SearchSong ¶
type SearchSong struct { ID int `json:"id"` Requests int `json:"requests"` LastRequested int64 `json:"lastrequested"` LastPlayed int64 `json:"lastplayed"` RequestDelay int64 `json:"-"` Artist string `json:"artist"` Title string `json:"title"` }
Song returned by Elastic Search
func (*SearchSong) CalculateRequestDelay ¶
func (s *SearchSong) CalculateRequestDelay()
Calculate request delay and requestability for a song FIXME: For some reason this returns incorrect results on some songs, but not others. Need to investigate.
func (*SearchSong) CanRequest ¶
func (s *SearchSong) CanRequest() bool
Return, if song can be requested
Click to show internal directories.
Click to hide internal directories.