v1

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2026 License: MIT Imports: 33 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterCatalogRoutes

func RegisterCatalogRoutes(api huma.API)

RegisterCatalogRoutes registers the indexer catalog browsing endpoints.

func RegisterDashboardRoutes added in v0.4.0

func RegisterDashboardRoutes(api huma.API, agg *dashboard.Aggregator)

RegisterDashboardRoutes registers the unified dashboard endpoints. The frontend polls /overview every 2s for the top-level cards and only hits /services/{id} when the drill-down drawer is open.

func RegisterDownloadClientRoutes

func RegisterDownloadClientRoutes(api huma.API, svc *downloadclient.Service)

RegisterDownloadClientRoutes registers download client management endpoints.

func RegisterEnvRoutes added in v0.4.0

func RegisterEnvRoutes(api huma.API)

RegisterEnvRoutes exposes the relevant env vars for this process so the Pulse dashboard can show what the operator configured. Secrets are redacted by substring match on the key.

func RegisterIndexerRoutes

func RegisterIndexerRoutes(api huma.API, mgr *indexer.Manager, proxyBaseURL ...string)

RegisterIndexerRoutes registers indexer management endpoints. proxyBaseURL is the Pulse external URL used for Torznab proxy URL rewriting (e.g., "http://pulse:9696"). If empty, URLs are not rewritten.

func RegisterPresetRoutes

func RegisterPresetRoutes(api huma.API, q db.Querier)

RegisterPresetRoutes registers filter preset CRUD endpoints.

func RegisterQualityProfileRoutes

func RegisterQualityProfileRoutes(api huma.API, svc *qualityprofile.Service)

RegisterQualityProfileRoutes registers quality profile management endpoints.

func RegisterRuntimeRoutes added in v0.4.0

func RegisterRuntimeRoutes(api huma.API, startTime time.Time)

RegisterRuntimeRoutes registers the Go-runtime stats endpoint.

func RegisterServiceRoutes

func RegisterServiceRoutes(api huma.API, svc *registry.Service)

RegisterServiceRoutes registers service registry and discovery endpoints.

func RegisterSharedSettingsRoutes

func RegisterSharedSettingsRoutes(api huma.API, svc *sharedsettings.Service)

RegisterSharedSettingsRoutes registers the shared media handling endpoints.

func RegisterSystemRoutes

func RegisterSystemRoutes(api huma.API, startTime time.Time)

RegisterSystemRoutes registers system/status endpoints.

func RegisterTagRoutes

func RegisterTagRoutes(api huma.API, svc *tag.Service)

RegisterTagRoutes registers the tag management endpoints.

func RegisterTorznabRoutes

func RegisterTorznabRoutes(r chi.Router, h *TorznabHandler)

RegisterTorznabRoutes registers the Torznab proxy endpoint on the chi router. This is registered directly on chi (not Huma) because Torznab uses XML, not JSON.

func RegisterUpdateRoutes added in v0.4.0

func RegisterUpdateRoutes(api huma.API)

RegisterUpdateRoutes registers GET /api/v1/system/updates.

func RegisterVPNRoutes added in v0.4.0

func RegisterVPNRoutes(api huma.API, rotator *gluetun.Rotator, troubles func() []scraper.SiteTrouble)

RegisterVPNRoutes registers the VPN control endpoints. Only called when a gluetun rotator is configured (see router.go's nil guard). troubles may be nil (no FlareSolverr); advice then never recommends rotating.

Types

type TestSearchResult

type TestSearchResult struct {
	Success    bool   `json:"success"`
	Message    string `json:"message"`
	Duration   string `json:"duration"`
	Results    int    `json:"results"`
	Cloudflare bool   `json:"cloudflare,omitempty"`
}

TestSearchResult is the JSON response from the test-search endpoint.

type TorznabHandler

type TorznabHandler struct {
	// contains filtered or unexported fields
}

TorznabHandler handles Torznab proxy requests.

func NewTorznabHandler

func NewTorznabHandler(engine *scraper.Engine, q db.Querier, mgr *indexer.Manager, externalURL string, logger *slog.Logger) *TorznabHandler

NewTorznabHandler creates a new handler. externalURL is optional; when set, torznab download proxy URLs use it instead of the request's Host header. mgr may be nil (tests) — search-health recording is then skipped.

func (*TorznabHandler) Handle

func (h *TorznabHandler) Handle(w http.ResponseWriter, r *http.Request)

Handle dispatches Torznab requests based on the ?t= parameter.

func (*TorznabHandler) HandleDownload

func (h *TorznabHandler) HandleDownload(w http.ResponseWriter, r *http.Request)

HandleDownload resolves a download URL from a detail page and redirects to it. This proxies downloads through Pulse so the client doesn't need CF cookies or tracker sessions. The detail page URL is passed via ?url= query param.

GET /api/v1/torznab/{indexer_id}/download?url=https://1337x.to/torrent/12345/...

func (*TorznabHandler) HandleTestSearch

func (h *TorznabHandler) HandleTestSearch(w http.ResponseWriter, r *http.Request)

HandleTestSearch does a real search through the scraper engine to validate that an indexer is functional — not just that its URL responds with HTTP 200.

Jump to

Keyboard shortcuts

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