Documentation
¶
Index ¶
- func RegisterCatalogRoutes(api huma.API)
- func RegisterDownloadClientRoutes(api huma.API, svc *downloadclient.Service)
- func RegisterIndexerRoutes(api huma.API, mgr *indexer.Manager, proxyBaseURL ...string)
- func RegisterPresetRoutes(api huma.API, q db.Querier)
- func RegisterQualityProfileRoutes(api huma.API, svc *qualityprofile.Service)
- func RegisterServiceRoutes(api huma.API, svc *registry.Service)
- func RegisterSharedSettingsRoutes(api huma.API, svc *sharedsettings.Service)
- func RegisterSystemRoutes(api huma.API, startTime time.Time)
- func RegisterTagRoutes(api huma.API, svc *tag.Service)
- func RegisterTorznabRoutes(r chi.Router, h *TorznabHandler)
- type TestSearchResult
- type TorznabHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterCatalogRoutes ¶
RegisterCatalogRoutes registers the indexer catalog browsing endpoints.
func RegisterDownloadClientRoutes ¶
func RegisterDownloadClientRoutes(api huma.API, svc *downloadclient.Service)
RegisterDownloadClientRoutes registers download client management endpoints.
func RegisterIndexerRoutes ¶
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 ¶
RegisterPresetRoutes registers filter preset CRUD endpoints.
func RegisterQualityProfileRoutes ¶
func RegisterQualityProfileRoutes(api huma.API, svc *qualityprofile.Service)
RegisterQualityProfileRoutes registers quality profile management endpoints.
func RegisterServiceRoutes ¶
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 ¶
RegisterSystemRoutes registers system/status endpoints.
func RegisterTagRoutes ¶
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.
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, 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.
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.