Documentation
¶
Index ¶
- func BackupHandler(db *sql.DB, logger *slog.Logger) http.HandlerFunc
- func RegisterAIRoutes(api huma.API, svc *aicommand.Service)
- func RegisterActivityRoutes(api huma.API, svc *activity.Service)
- func RegisterBlocklistRoutes(api huma.API, svc *blocklist.Service)
- func RegisterCollectionRoutes(api huma.API, svc *collection.Service)
- func RegisterCustomFormatRoutes(api huma.API, svc *customformat.Service)
- func RegisterDiscoverRoutes(api huma.API, movieSvc *movie.Service, tmdbClient *tmdb.Client)
- func RegisterDownloadClientRoutes(api huma.API, svc *downloader.Service, tagSvc *tag.Service)
- func RegisterDownloadHandlingRoutes(api huma.API, svc *downloadhandling.Service)
- func RegisterFilesystemRoutes(api huma.API)
- func RegisterHaulHistoryRoutes(api huma.API, downloaderSvc *downloader.Service, importerSvc *importer.Service)
- func RegisterHealthRoutes(api huma.API, svc *health.Service)
- func RegisterHistoryRoutes(api huma.API, svc *indexer.Service)
- func RegisterHookRoutes(api huma.API, libSvc *library.Service, movieSvc *movie.Service, ...)
- func RegisterImportListRoutes(api huma.API, svc *importlist.Service, tagSvc *tag.Service)
- func RegisterImportRoutes(api huma.API, svc *radarrimport.Service)
- func RegisterIndexerRoutes(api huma.API, svc *indexer.Service, tagSvc *tag.Service)
- func RegisterLibraryRoutes(api huma.API, svc *library.Service, movieSvc *movie.Service)
- func RegisterMediaManagementRoutes(api huma.API, svc *mediamanagement.Service)
- func RegisterMediaServerRoutes(api huma.API, svc *mediaserver.Service)
- func RegisterMediainfoRoutes(api huma.API, mediaSvc *mediainfo.Service)
- func RegisterMovieCreditsRoutes(api huma.API, movieSvc *movie.Service, tmdbClient *tmdb.Client)
- func RegisterMovieFileRoutes(api huma.API, svc *movie.Service, mmSvc *mediamanagement.Service, ...)
- func RegisterMovieRoutes(api huma.API, svc *movie.Service, tagSvc *tag.Service, ...)
- func RegisterNotificationRoutes(api huma.API, svc *notification.Service, tagSvc *tag.Service)
- func RegisterParseRoutes(api huma.API)
- func RegisterPeopleRoutes(api huma.API, movieSvc *movie.Service, tmdbClient *tmdb.Client)
- func RegisterPlexAuthRoutes(api huma.API)
- func RegisterPlexSyncRoutes(api huma.API, svc *plexsync.Service)
- func RegisterProviderRoutes(api huma.API, r *provider.Resolver)
- func RegisterQualityDefinitionRoutes(api huma.API, svc *quality.DefinitionService)
- func RegisterQualityProfileRoutes(api huma.API, svc *quality.Service)
- func RegisterQueueRoutes(api huma.API, svc *queue.Service, bl *blocklist.Service)
- func RegisterReleaseRoutes(api huma.API, indexerSvc *indexer.Service, movieSvc *movie.Service, ...)
- func RegisterStatsRoutes(api huma.API, svc *stats.Service)
- func RegisterSystemRoutes(api huma.API, startTime time.Time, dbType, dbPath, configFile string, ...)
- func RegisterTagRoutes(api huma.API, svc *tag.Service)
- func RegisterTaskRoutes(api huma.API, sched *scheduler.Scheduler)
- func RegisterUpdateRoutes(api huma.API)
- func RegisterWantedRoutes(api huma.API, svc *movie.Service)
- func RegisterWatchSyncRoutes(api huma.API, svc *watchsync.Service)
- func RestoreHandler(dbPath string, logger *slog.Logger) http.HandlerFunc
- type PlexPinResponse
- type PlexPinStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BackupHandler ¶
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 ¶
RegisterAIRoutes registers the /api/v1/ai/* endpoints.
func RegisterActivityRoutes ¶
RegisterActivityRoutes registers the /api/v1/activity endpoints.
func RegisterBlocklistRoutes ¶
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 ¶
RegisterDiscoverRoutes registers the /api/v1/discover/* endpoints.
func RegisterDownloadClientRoutes ¶
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 ¶
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 ¶
RegisterHealthRoutes registers the GET /api/v1/system/health endpoint.
func RegisterHistoryRoutes ¶
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 ¶
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 ¶
RegisterIndexerRoutes registers all /api/v1/indexers endpoints.
func RegisterLibraryRoutes ¶
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 ¶
RegisterMediainfoRoutes registers the scanner status and bulk scan endpoints. mediaSvc may be nil (scanner not configured); status returns available=false.
func RegisterMovieCreditsRoutes ¶
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 ¶
RegisterNotificationRoutes registers the /api/v1/notifications endpoints.
func RegisterParseRoutes ¶
RegisterParseRoutes registers the filename-parsing utility endpoint.
func RegisterPeopleRoutes ¶
RegisterPeopleRoutes registers the /api/v1/people/{id} endpoint.
func RegisterPlexAuthRoutes ¶
RegisterPlexAuthRoutes registers the Plex pin-based auth endpoints.
func RegisterPlexSyncRoutes ¶
RegisterPlexSyncRoutes registers the Plex library sync endpoints.
func RegisterProviderRoutes ¶
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 ¶
RegisterQualityProfileRoutes registers all /api/v1/quality-profiles endpoints.
func RegisterQueueRoutes ¶
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 ¶
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 ¶
RegisterTagRoutes registers the tag management endpoints.
func RegisterTaskRoutes ¶
RegisterTaskRoutes registers the /api/v1/tasks endpoints.
func RegisterUpdateRoutes ¶
RegisterUpdateRoutes registers GET /api/v1/system/updates.
func RegisterWantedRoutes ¶
RegisterWantedRoutes registers the wanted/missing and cutoff-unmet endpoints.
func RegisterWatchSyncRoutes ¶
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 ¶
PlexPinStatus is returned when checking a Plex pin.
Source Files
¶
- activity.go
- ai.go
- backup.go
- blocklist.go
- collections.go
- customformats.go
- discover.go
- download_clients.go
- download_handling.go
- filesystem.go
- haul_history.go
- health.go
- history.go
- hooks.go
- import.go
- importlists.go
- indexers.go
- libraries.go
- media_management.go
- media_servers.go
- mediainfo.go
- movie_credits.go
- movies.go
- notifications.go
- parse.go
- people.go
- plex_auth.go
- plex_sync.go
- providers.go
- quality_definitions.go
- quality_profiles.go
- queue.go
- releases.go
- stats.go
- system.go
- tags.go
- tasks.go
- updates.go
- wanted.go
- watchsync.go