Documentation
¶
Index ¶
- type GenerationResult
- type Generator
- func (g *Generator) Generate(ctx context.Context, theme *config.ThemeConfig, dryRun bool) GenerationResult
- func (g *Generator) GenerateAll(ctx context.Context, themes []config.ThemeConfig, dryRun bool) ([]GenerationResult, error)
- func (g *Generator) GetChannels(ctx context.Context) ([]tunarr.Channel, error)
- func (g *Generator) ValidateChannel(ctx context.Context, channelID string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GenerationResult ¶
type GenerationResult struct {
ThemeName string
ChannelID string
Generated bool
ItemCount int
TotalScore float64
Duration time.Duration
Error error
Playlist *models.Playlist
}
GenerationResult contains the results of a playlist generation
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
Generator handles playlist generation and Tunarr integration
func NewGenerator ¶
func NewGenerator( tunarrClient *tunarr.Client, scorer *similarity.Scorer, cooldownManager *cooldown.Manager, logger *slog.Logger, ) *Generator
NewGenerator creates a new playlist Generator
func (*Generator) Generate ¶
func (g *Generator) Generate(ctx context.Context, theme *config.ThemeConfig, dryRun bool) GenerationResult
Generate creates a playlist for a single theme
func (*Generator) GenerateAll ¶
func (g *Generator) GenerateAll(ctx context.Context, themes []config.ThemeConfig, dryRun bool) ([]GenerationResult, error)
GenerateAll generates playlists for all themes
func (*Generator) GetChannels ¶
GetChannels retrieves all Tunarr channels
Click to show internal directories.
Click to hide internal directories.