v1

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2026 License: MIT Imports: 24 Imported by: 0

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 RegisterDownloadClientRoutes

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

RegisterDownloadClientRoutes registers download client management endpoints.

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 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.

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.

Jump to

Keyboard shortcuts

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