Record generation outcomes and summaries for history while keeping article content transient. Refs #7 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
20 lines
354 B
Go
20 lines
354 B
Go
package scraper
|
|
|
|
import "github.com/tradarr/backend/internal/models"
|
|
|
|
type Registry struct {
|
|
scrapers map[string]Scraper
|
|
repo *models.Repository
|
|
}
|
|
|
|
func NewRegistry(repo *models.Repository) *Registry {
|
|
return &Registry{
|
|
scrapers: map[string]Scraper{},
|
|
repo: repo,
|
|
}
|
|
}
|
|
|
|
func (r *Registry) Register(s Scraper) {
|
|
r.scrapers[s.Name()] = s
|
|
}
|