playlist

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

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

func (g *Generator) GetChannels(ctx context.Context) ([]tunarr.Channel, error)

GetChannels retrieves all Tunarr channels

func (*Generator) ValidateChannel

func (g *Generator) ValidateChannel(ctx context.Context, channelID string) error

ValidateChannel checks if a channel exists in Tunarr

Jump to

Keyboard shortcuts

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