Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var IconMap map[string]string
IconMap holds our icon-paths
Functions ¶
func GenerateThumbnails ¶
func GenerateThumbnails(mediaDir, outDir string)
GenerateThumbnails scans the availability of thumbs for all movies and genrates missing ones
func Init ¶
func Init(baseDir string)
Init will initialize the module state, meaning it scans for movies, icons and saved playlists and inits the IconMap and Playlists variables
func Save ¶
func Save(baseDir string)
Save will save the module state to one or more json-config files
func SetPlaylists ¶
func SetPlaylists(p []*Playlist)
SetPlaylists looks up items in the provided playlist slice by path and updates all secondary lists with pointers from the global movieMap, if found
func UpdateMovieSettings ¶
func UpdateMovieSettings(movie *Movie)
UpdateMovieSettings looks up the provided movie by path and updates its settings, if found
Types ¶
type Movie ¶
type Movie struct { Path string `json:"path"` Duration float64 `json:"duration"` Delay float64 `json:"delay"` IconPath string `json:"icon"` }
Movie groups information about a movie-file
type PlaybackState ¶
type PlaybackState struct { Connected bool `json:"connected"` Path string `json:"path"` PlaylistIndex int `json:"playlist_index"` MovieIndex int `json:"movie_index"` Position float64 `json:"position"` Duration float64 `json:"duration"` Volume float64 `json:"volume"` Rate float64 `json:"rate"` Playing bool `json:"playing"` }
PlaybackState groups information for the current playback state
func NewPlaybackState ¶
func NewPlaybackState() *PlaybackState
NewPlaybackState creates the default playbackstate
type PlaybackStateUpdater ¶
type PlaybackStateUpdater struct { Done chan bool Address string // contains filtered or unexported fields }
PlaybackStateUpdater is used to periodically update the playback-state and push the current state to a provided channel
func NewPlaybackStateUpdater ¶
func NewPlaybackStateUpdater( ip string, timeOut time.Duration, output chan<- *PlaybackState) *PlaybackStateUpdater
NewPlaybackStateUpdater creates a new instance
func (*PlaybackStateUpdater) GetState ¶
func (updater *PlaybackStateUpdater) GetState() PlaybackState
GetState returns the current state in a threadsafe way using a mutex
func (*PlaybackStateUpdater) Playback ¶
func (updater *PlaybackStateUpdater) Playback(movieIndex int, playlistIndex int)
Playback sets a new playlist-index and optionally a new playlist
func (*PlaybackStateUpdater) SetState ¶
func (updater *PlaybackStateUpdater) SetState(state PlaybackState)
SetState sets the current state in a threadsafe way using a mutex