v1

package
v0.13.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: 61 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 BackupHandler

func BackupHandler(db *sql.DB, logger *slog.Logger) http.HandlerFunc

BackupHandler returns an http.HandlerFunc that streams a consistent snapshot of the SQLite database as a file download.

Registered directly on the chi router (not via huma) because huma wraps all responses in JSON, which is unsuitable for file downloads.

The snapshot is produced with `VACUUM INTO`, which writes a fully consistent copy even while the live database is in WAL mode and being written to.

func RegisterAIRoutes

func RegisterAIRoutes(api huma.API, svc *aicommand.Service)

RegisterAIRoutes registers the /api/v1/ai/* endpoints.

func RegisterActivityRoutes

func RegisterActivityRoutes(api huma.API, svc *activity.Service)

RegisterActivityRoutes registers the /api/v1/activity endpoints.

func RegisterBlocklistRoutes

func RegisterBlocklistRoutes(api huma.API, svc *blocklist.Service)

RegisterBlocklistRoutes registers the blocklist management endpoints.

func RegisterCollectionRoutes

func RegisterCollectionRoutes(api huma.API, svc *collection.Service)

RegisterCollectionRoutes registers collection CRUD and person search endpoints. svc may be nil (TMDB not configured); endpoints return 503 in that case.

func RegisterCustomFormatRoutes

func RegisterCustomFormatRoutes(api huma.API, svc *customformat.Service)

RegisterCustomFormatRoutes registers the custom format management endpoints.

func RegisterDiscoverRoutes

func RegisterDiscoverRoutes(api huma.API, movieSvc *movie.Service, tmdbClient *tmdb.Client)

RegisterDiscoverRoutes registers the /api/v1/discover/* endpoints.

func RegisterDownloadClientRoutes

func RegisterDownloadClientRoutes(api huma.API, svc *downloader.Service, tagSvc *tag.Service)

RegisterDownloadClientRoutes registers all /api/v1/download-clients endpoints.

func RegisterDownloadHandlingRoutes

func RegisterDownloadHandlingRoutes(api huma.API, svc *downloadhandling.Service)

RegisterDownloadHandlingRoutes registers download handling settings and remote path mapping endpoints.

func RegisterFilesystemRoutes

func RegisterFilesystemRoutes(api huma.API)

RegisterFilesystemRoutes registers the server-side filesystem browsing endpoint.

func RegisterHaulHistoryRoutes

func RegisterHaulHistoryRoutes(api huma.API, downloaderSvc *downloader.Service, importerSvc *importer.Service)

RegisterHaulHistoryRoutes wires the two endpoints.

func RegisterHealthRoutes

func RegisterHealthRoutes(api huma.API, svc *health.Service)

RegisterHealthRoutes registers the GET /api/v1/system/health endpoint.

func RegisterHistoryRoutes

func RegisterHistoryRoutes(api huma.API, svc *indexer.Service)

RegisterHistoryRoutes registers the global grab history endpoint and the per-movie grab history endpoint.

func RegisterHookRoutes

func RegisterHookRoutes(
	api huma.API,
	libSvc *library.Service,
	movieSvc *movie.Service,
	bus *events.Bus,
	sched *scheduler.Scheduler,
)

RegisterHookRoutes registers inbound webhook trigger endpoints.

func RegisterImportListRoutes

func RegisterImportListRoutes(api huma.API, svc *importlist.Service, tagSvc *tag.Service)

RegisterImportListRoutes registers the /api/v1/importlists endpoints.

func RegisterImportRoutes

func RegisterImportRoutes(api huma.API, svc *radarrimport.Service)

RegisterImportRoutes registers all /api/v1/import endpoints.

func RegisterIndexerRoutes

func RegisterIndexerRoutes(api huma.API, svc *indexer.Service, tagSvc *tag.Service)

RegisterIndexerRoutes registers all /api/v1/indexers endpoints.

func RegisterLibraryRoutes

func RegisterLibraryRoutes(api huma.API, svc *library.Service, movieSvc *movie.Service)

RegisterLibraryRoutes registers all /api/v1/libraries endpoints. movieSvc may be nil; the disk-import endpoints are skipped when it is.

func RegisterMediaManagementRoutes

func RegisterMediaManagementRoutes(api huma.API, svc *mediamanagement.Service)

RegisterMediaManagementRoutes registers /api/v1/media-management endpoints.

func RegisterMediaServerRoutes

func RegisterMediaServerRoutes(api huma.API, svc *mediaserver.Service)

RegisterMediaServerRoutes registers the /api/v1/media-servers endpoints.

func RegisterMediainfoRoutes

func RegisterMediainfoRoutes(api huma.API, mediaSvc *mediainfo.Service)

RegisterMediainfoRoutes registers the scanner status and bulk scan endpoints. mediaSvc may be nil (scanner not configured); status returns available=false.

func RegisterMovieCreditsRoutes

func RegisterMovieCreditsRoutes(api huma.API, movieSvc *movie.Service, tmdbClient *tmdb.Client)

RegisterMovieCreditsRoutes registers the /api/v1/movies/{id}/credits endpoint. tmdbClient may be nil (TMDB not configured).

func RegisterMovieFileRoutes

func RegisterMovieFileRoutes(api huma.API, svc *movie.Service, mmSvc *mediamanagement.Service, mediaSvc *mediainfo.Service)

RegisterMovieFileRoutes registers file management endpoints for a movie. mediaSvc may be nil when ffprobe is not configured; in that case scanning endpoints return 503 and the mediainfo field is omitted from file responses.

func RegisterMovieRoutes

func RegisterMovieRoutes(api huma.API, svc *movie.Service, tagSvc *tag.Service, watchSvc ...*watchsync.Service)

RegisterMovieRoutes registers all /api/v1/movies endpoints.

func RegisterNotificationRoutes

func RegisterNotificationRoutes(api huma.API, svc *notification.Service, tagSvc *tag.Service)

RegisterNotificationRoutes registers the /api/v1/notifications endpoints.

func RegisterParseRoutes

func RegisterParseRoutes(api huma.API)

RegisterParseRoutes registers the filename-parsing utility endpoint.

func RegisterPeopleRoutes

func RegisterPeopleRoutes(api huma.API, movieSvc *movie.Service, tmdbClient *tmdb.Client)

RegisterPeopleRoutes registers the /api/v1/people/{id} endpoint.

func RegisterPlexAuthRoutes

func RegisterPlexAuthRoutes(api huma.API)

RegisterPlexAuthRoutes registers the Plex pin-based auth endpoints.

func RegisterPlexSyncRoutes

func RegisterPlexSyncRoutes(api huma.API, svc *plexsync.Service)

RegisterPlexSyncRoutes registers the Plex library sync endpoints.

func RegisterProviderRoutes

func RegisterProviderRoutes(api huma.API, r *provider.Resolver)

RegisterProviderRoutes wires the /api/v1/settings/providers/{name} endpoints onto the given Huma API.

func RegisterQualityDefinitionRoutes

func RegisterQualityDefinitionRoutes(api huma.API, svc *quality.DefinitionService)

RegisterQualityDefinitionRoutes registers /api/v1/quality-definitions endpoints.

func RegisterQualityProfileRoutes

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

RegisterQualityProfileRoutes registers all /api/v1/quality-profiles endpoints.

func RegisterQueueRoutes

func RegisterQueueRoutes(api huma.API, svc *queue.Service, bl *blocklist.Service)

RegisterQueueRoutes registers the /api/v1/queue endpoints.

func RegisterReleaseRoutes

func RegisterReleaseRoutes(api huma.API, indexerSvc *indexer.Service, movieSvc *movie.Service, downloaderSvc *downloader.Service, blocklistSvc *blocklist.Service, qualitySvc *quality.Service, autoSearchSvc *autosearch.Service, logger *slog.Logger)

RegisterReleaseRoutes registers the release search, grab, and auto-search endpoints. downloaderSvc may be nil; in that case grabs are recorded to history without being sent to a download client (backward-compatible with Phase 2 mode). blocklistSvc may be nil; in that case blocklist checking is skipped. qualitySvc may be nil; in that case score breakdowns are omitted from responses. autoSearchSvc may be nil; in that case auto-search endpoints are not registered.

func RegisterStatsRoutes

func RegisterStatsRoutes(api huma.API, svc *stats.Service)

RegisterStatsRoutes registers the four statistics endpoints.

func RegisterSystemRoutes

func RegisterSystemRoutes(api huma.API, startTime time.Time, dbType, dbPath, configFile string, aiCmdSvc *aicommand.Service, tmdbKeyIsDefault bool, apiKey string, movieSvc *movie.Service, logger *slog.Logger)

RegisterSystemRoutes registers the /api/v1/system/* endpoints. movieSvc/aiCmdSvc may be nil in test environments.

func RegisterTagRoutes

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

RegisterTagRoutes registers the tag management endpoints.

func RegisterTaskRoutes

func RegisterTaskRoutes(api huma.API, sched *scheduler.Scheduler)

RegisterTaskRoutes registers the /api/v1/tasks endpoints.

func RegisterUpdateRoutes

func RegisterUpdateRoutes(api huma.API)

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

func RegisterWantedRoutes

func RegisterWantedRoutes(api huma.API, svc *movie.Service)

RegisterWantedRoutes registers the wanted/missing and cutoff-unmet endpoints.

func RegisterWatchSyncRoutes

func RegisterWatchSyncRoutes(api huma.API, svc *watchsync.Service)

RegisterWatchSyncRoutes registers the watch sync API endpoints.

func RestoreHandler

func RestoreHandler(dbPath string, logger *slog.Logger) http.HandlerFunc

RestoreHandler returns an http.HandlerFunc that accepts a SQLite database file upload and replaces the live database file with it.

The replacement takes effect on the next process start: SQLite holds the file open, so the handler writes the upload alongside the live database and the operator restarts the service to load it. The response says as much.

Types

type PlexPinResponse

type PlexPinResponse struct {
	ID      int64  `json:"id"`
	Code    string `json:"code"`
	AuthURL string `json:"auth_url"`
}

PlexPinResponse is returned when creating a new Plex auth pin.

type PlexPinStatus

type PlexPinStatus struct {
	Claimed bool   `json:"claimed"`
	Token   string `json:"token,omitempty"`
}

PlexPinStatus is returned when checking a Plex pin.

Jump to

Keyboard shortcuts

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