episodecollector

package
v0.0.0-...-f69f2d5 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector

type Collector struct {
	Config
	Plugin soundtouch.PluginFunc
	// contains filtered or unexported fields
}

Collector describes the plugin. It has a Config to store the configuration Plugin the plugin function suspended indicates that the plugin is temporarely suspended

func NewCollector

func NewCollector(config Config) (d *Collector)

NewCollector creates a new Collector plugin with the configuration

func (*Collector) Description

func (d *Collector) Description() string

Description returns a string explaining the purpose of this plugin

func (*Collector) Disable

func (d *Collector) Disable()

Disable temporarely the execution of the plugin

func (*Collector) Enable

func (d *Collector) Enable()

Enable temporarely the execution of the plugin

func (*Collector) Execute

func (d *Collector) Execute(pluginName string, update soundtouch.Update, speaker soundtouch.Speaker)

Execute runs the plugin with the given parameter

func (*Collector) IsEnabled

func (d *Collector) IsEnabled() bool

IsEnabled returns true if the plugin is not suspened

func (*Collector) Name

func (d *Collector) Name() string

Name returns the plugin name

func (*Collector) SampleConfig

func (d *Collector) SampleConfig() string

SampleConfig returns text explaining how plugin should be configured

func (*Collector) Terminate

func (d *Collector) Terminate() bool

Terminate indicates that no further plugin will be executed on this speaker

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

Jump to

Keyboard shortcuts

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