Documentation ¶
Index ¶
- func ScanForVolume(spk *soundtouch.Speaker) *soundtouch.Volume
- func WriteDB(sdb *scribble.Driver, speakerName, album string, storedAlbum *DbEntry)
- type Config
- type DbEntry
- type VolumeButler
- func (vb *VolumeButler) Description() string
- func (vb *VolumeButler) Disable()
- func (vb *VolumeButler) Enable()
- func (vb *VolumeButler) Execute(pluginName string, update soundtouch.Update, speaker soundtouch.Speaker)
- func (vb *VolumeButler) IsEnabled() bool
- func (vb *VolumeButler) Name() string
- func (vb *VolumeButler) SampleConfig() string
- func (vb *VolumeButler) Terminate() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ScanForVolume ¶
func ScanForVolume(spk *soundtouch.Speaker) *soundtouch.Volume
ScanForVolume listens for Volume updates and returns the latest received Volume, when the channel is closed
Types ¶
type Config ¶
type Config struct { Speakers []string `toml:"speakers"` Artists []string `toml:"artists"` Database string `toml:"database"` }
Config contains the configuration of the plugin Speakers list of SpeakerNames the handler is added. All if empty Artists a list of artists for which episodes should be collected
type DbEntry ¶
type DbEntry struct { ContentItem soundtouch.ContentItem AlbumName string Volume int DeviceID string LastUpdated time.Time }
func ReadAlbumDB ¶
type VolumeButler ¶
type VolumeButler struct { Config Plugin soundtouch.PluginFunc // contains filtered or unexported fields }
VolumeButler describes the plugin. It has a Config to store the configuration Plugin the plugin function suspended indicates that the plugin is temporarely suspended scribbleDB a link to the volumes database
func NewVolumeButler ¶
func NewVolumeButler(config Config) (d *VolumeButler)
NewVolumeButler creates a new Collector plugin with the configuration
func (*VolumeButler) Description ¶
func (vb *VolumeButler) Description() string
Description returns a string explaining the purpose of this plugin
func (*VolumeButler) Disable ¶
func (vb *VolumeButler) Disable()
Disable temporarely the execution of the plugin
func (*VolumeButler) Enable ¶
func (vb *VolumeButler) Enable()
Enable temporarely the execution of the plugin
func (*VolumeButler) Execute ¶
func (vb *VolumeButler) Execute(pluginName string, update soundtouch.Update, speaker soundtouch.Speaker)
Execute runs the plugin with the given parameter
func (*VolumeButler) IsEnabled ¶
func (vb *VolumeButler) IsEnabled() bool
IsEnabled returns true if the plugin is not suspened
func (*VolumeButler) SampleConfig ¶
func (vb *VolumeButler) SampleConfig() string
SampleConfig returns text explaining how plugin should be configured
func (*VolumeButler) Terminate ¶
func (vb *VolumeButler) Terminate() bool
Terminate indicates that no further plugin will be executed on this speaker