Documentation
¶
Index ¶
- func BackupDownloadHandler(svc *backup.Service, logger *slog.Logger) http.HandlerFunc
- func BackupHandler(db *sql.DB, dbPath string, logger *slog.Logger) http.HandlerFunc
- func NewAutoSearchRetryHandler(showSvc *show.Service, indexerSvc *indexer.Service, ...) events.Handler
- func RegisterActivityRoutes(humaAPI huma.API, svc *activity.Service)
- func RegisterAuthSettingsRoutes(api huma.API, auth *middleware.Auth, configFile string)
- func RegisterBackupRoutes(api huma.API, svc *backup.Service)
- func RegisterBlocklistRoutes(api huma.API, svc *blocklist.Service)
- func RegisterCalendarRoutes(api huma.API, q db.Querier)
- func RegisterDelayRoutes(api huma.API, q db.Querier)
- func RegisterDiscoverRoutes(api huma.API, showSvc *show.Service)
- func RegisterDownloadClientRoutes(api huma.API, svc *downloader.Service)
- func RegisterEnvRoutes(api huma.API)
- func RegisterEpisodeFileRoutes(api huma.API, svc *show.Service, mmSvc *mediamanagement.Service)
- func RegisterFilesystemRoutes(api huma.API)
- func RegisterHaulHistoryRoutes(api huma.API, q db.Querier, downloaderSvc *downloader.Service, ...)
- func RegisterHealthRoutes(api huma.API, svc *health.Service)
- func RegisterHistoryRoutes(humaAPI huma.API, q db.Querier)
- func RegisterImportListRoutes(api huma.API, svc *importlist.Service)
- func RegisterImportRoutes(api huma.API, svc *sonarrimport.Service)
- func RegisterIndexerRoutes(api huma.API, svc *indexer.Service)
- func RegisterLanguageRoutes(api huma.API, q db.Querier)
- func RegisterLibraryRoutes(api huma.API, librarySvc *library.Service)
- func RegisterManualImportRoutes(api huma.API, svc *importer.Service)
- func RegisterMediaManagementRoutes(api huma.API, svc *mediamanagement.Service)
- func RegisterMediaServerRoutes(api huma.API, svc *mediaserver.Service)
- func RegisterNotificationRoutes(api huma.API, svc *notification.Service)
- func RegisterPeopleRoutes(api huma.API, showSvc *show.Service)
- func RegisterProviderRoutes(api huma.API, r *provider.Resolver)
- func RegisterQualityDefinitionRoutes(api huma.API, svc *quality.DefinitionService)
- func RegisterQualityProfileRoutes(api huma.API, qualitySvc *quality.Service)
- func RegisterQueueRoutes(api huma.API, svc *queue.Service, bl *blocklist.Service)
- func RegisterRecycleBinRoutes(api huma.API, svc *recyclebin.Service)
- func RegisterReleaseProfileRoutes(api huma.API, svc *releaseprofile.Service)
- func RegisterReleaseRoutes(api huma.API, indexerSvc *indexer.Service, showSvc *show.Service, ...)
- func RegisterRemotePathMappingRoutes(api huma.API, svc *remotepath.Service)
- func RegisterRuntimeRoutes(api huma.API, startTime time.Time)
- func RegisterSeriesBulkRoutes(api huma.API, svc *seriesbulk.Service)
- func RegisterSeriesRoutes(api huma.API, showSvc *show.Service)
- func RegisterStatsRoutes(humaAPI huma.API, svc *stats.Service)
- func RegisterSystemRoutes(api huma.API, startTime time.Time, dbType, dbPath, configFile, apiKey string, ...)
- func RegisterTaskRoutes(api huma.API, sched *scheduler.Scheduler)
- func RegisterUnmappedFolderRoutes(api huma.API, svc *unmapped.Service, scan func(), logger *slog.Logger)
- func RegisterUpdateRoutes(api huma.API)
- func RegisterWantedRoutes(api huma.API, q db.Querier, profiles wanted.ProfileGetter)
- func RegisterWantedSearchRoutes(api huma.API, q db.Querier, showSvc *show.Service, indexerSvc *indexer.Service, ...)
- func RestoreHandler(dbPath string, logger *slog.Logger) http.HandlerFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BackupDownloadHandler ¶
BackupDownloadHandler serves one backup file as a download.
func BackupHandler ¶
BackupHandler returns an http.HandlerFunc that streams a consistent SQLite backup as a downloadable file using VACUUM INTO.
func NewAutoSearchRetryHandler ¶
func NewAutoSearchRetryHandler( showSvc *show.Service, indexerSvc *indexer.Service, downloaderSvc *downloader.Service, blocklistSvc *blocklist.Service, qualitySvc *quality.Service, logger *slog.Logger, ) events.Handler
NewAutoSearchRetryHandler returns an event-bus handler that performs the re-search requested by TypeAutoSearchRetry. The stall watcher and the failed-download handler publish that event after blocklisting a dead release; this is what actually searches again and grabs the next best release. The blocklist entry they wrote keeps the dead release out.
Before this existed the event had no subscriber, so stalled or failed automatic grabs were blocklisted and then nothing happened.
func RegisterActivityRoutes ¶
RegisterActivityRoutes registers the /api/v1/activity endpoints.
func RegisterAuthSettingsRoutes ¶
func RegisterAuthSettingsRoutes(api huma.API, auth *middleware.Auth, configFile string)
RegisterAuthSettingsRoutes registers GET/PUT /api/v1/system/auth, which read and change the browser login settings. Changes apply immediately and are written to config.yaml.
func RegisterBackupRoutes ¶
RegisterBackupRoutes registers the backup list, create, delete, restore and settings endpoints. Downloads are served by BackupDownloadHandler (a binary response).
func RegisterBlocklistRoutes ¶
RegisterBlocklistRoutes registers the blocklist management endpoints.
func RegisterCalendarRoutes ¶
RegisterCalendarRoutes registers the calendar endpoint.
func RegisterDelayRoutes ¶
RegisterDelayRoutes registers the delay profile and pending-release endpoints.
func RegisterDiscoverRoutes ¶
RegisterDiscoverRoutes registers the /api/v1/discover/* endpoints used by the Discover detail page.
func RegisterDownloadClientRoutes ¶
func RegisterDownloadClientRoutes(api huma.API, svc *downloader.Service)
RegisterDownloadClientRoutes registers all /api/v1/download-clients endpoints.
func RegisterEnvRoutes ¶
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 RegisterEpisodeFileRoutes ¶
RegisterEpisodeFileRoutes registers file management endpoints for a series.
func RegisterFilesystemRoutes ¶
RegisterFilesystemRoutes registers the server-side filesystem browsing endpoint.
func RegisterHaulHistoryRoutes ¶
func RegisterHaulHistoryRoutes(api huma.API, q db.Querier, downloaderSvc *downloader.Service, importerSvc *importer.Service, paths *remotepath.Service)
RegisterHaulHistoryRoutes wires the haul-history endpoints.
Haul reports paths as it sees them; paths maps them to Pilot's view (remote path mappings). A nil paths uses them as reported.
func RegisterHealthRoutes ¶
RegisterHealthRoutes registers the health check endpoints.
func RegisterHistoryRoutes ¶
RegisterHistoryRoutes registers the global grab history endpoint and the per-series grab history endpoint.
func RegisterImportListRoutes ¶
func RegisterImportListRoutes(api huma.API, svc *importlist.Service)
func RegisterImportRoutes ¶
func RegisterImportRoutes(api huma.API, svc *sonarrimport.Service)
func RegisterIndexerRoutes ¶
RegisterIndexerRoutes registers all /api/v1/indexers endpoints.
func RegisterLanguageRoutes ¶
RegisterLanguageRoutes registers the language preference endpoints.
func RegisterLibraryRoutes ¶
RegisterLibraryRoutes registers all /api/v1/libraries endpoints.
func RegisterManualImportRoutes ¶
RegisterManualImportRoutes registers the manual import endpoints.
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 RegisterNotificationRoutes ¶
func RegisterNotificationRoutes(api huma.API, svc *notification.Service)
RegisterNotificationRoutes registers the /api/v1/notifications endpoints.
func RegisterPeopleRoutes ¶
RegisterPeopleRoutes registers the /api/v1/people/{id} endpoint.
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 RegisterRecycleBinRoutes ¶
func RegisterRecycleBinRoutes(api huma.API, svc *recyclebin.Service)
RegisterRecycleBinRoutes registers the recycle bin endpoints. The bin's folder and cleanup period are media management settings.
func RegisterReleaseProfileRoutes ¶
func RegisterReleaseProfileRoutes(api huma.API, svc *releaseprofile.Service)
RegisterReleaseProfileRoutes registers CRUD for release profiles.
func RegisterReleaseRoutes ¶
func RegisterReleaseRoutes(api huma.API, indexerSvc *indexer.Service, showSvc *show.Service, downloaderSvc *downloader.Service, blocklistSvc *blocklist.Service, qualitySvc *quality.Service)
RegisterReleaseRoutes registers the release search and grab history endpoints. qualitySvc may be nil; when nil, the quality-profile gate is skipped and all releases are considered acceptable regardless of the series profile.
func RegisterRemotePathMappingRoutes ¶
func RegisterRemotePathMappingRoutes(api huma.API, svc *remotepath.Service)
RegisterRemotePathMappingRoutes registers CRUD for remote path mappings.
func RegisterRuntimeRoutes ¶
RegisterRuntimeRoutes registers the Go-runtime stats endpoint.
func RegisterSeriesBulkRoutes ¶
func RegisterSeriesBulkRoutes(api huma.API, svc *seriesbulk.Service)
RegisterSeriesBulkRoutes registers the series mass editor endpoints. Each request changes every listed series or none.
func RegisterSeriesRoutes ¶
RegisterSeriesRoutes registers all /api/v1/series, /api/v1/episodes, and /api/v1/seasons endpoints.
func RegisterStatsRoutes ¶
RegisterStatsRoutes registers the /api/v1/stats/* endpoints.
func RegisterSystemRoutes ¶
func RegisterSystemRoutes(api huma.API, startTime time.Time, dbType, dbPath, configFile, apiKey string, tmdbKeyConfigured, tmdbKeyIsDefault bool, logger *slog.Logger)
RegisterSystemRoutes registers the /api/v1/system/* endpoints.
func RegisterTaskRoutes ¶
RegisterTaskRoutes registers the /api/v1/tasks endpoints.
func RegisterUnmappedFolderRoutes ¶
func RegisterUnmappedFolderRoutes(api huma.API, svc *unmapped.Service, scan func(), logger *slog.Logger)
RegisterUnmappedFolderRoutes registers the library-import review endpoints. scan, when not nil, starts a library scan after a folder is confirmed so its files are picked up right away.
func RegisterUpdateRoutes ¶
RegisterUpdateRoutes registers GET /api/v1/system/updates.
func RegisterWantedRoutes ¶
RegisterWantedRoutes registers the wanted/missing and wanted/cutoff endpoints.
func RegisterWantedSearchRoutes ¶
func RegisterWantedSearchRoutes( api huma.API, q db.Querier, showSvc *show.Service, indexerSvc *indexer.Service, downloaderSvc *downloader.Service, blocklistSvc *blocklist.Service, qualitySvc *quality.Service, logger *slog.Logger, )
RegisterWantedSearchRoutes registers the "search all missing" and "search all cutoff unmet" actions. Each queues the matching episodes and searches them one at a time in the background, grabbing the best release the profile accepts (an upgrade, for cutoff-unmet episodes).
func RestoreHandler ¶
func RestoreHandler(dbPath string, logger *slog.Logger) http.HandlerFunc
RestoreHandler returns an http.HandlerFunc that accepts a raw SQLite database upload and writes it to a staging path. The actual swap happens on next application startup.
Types ¶
This section is empty.
Source Files
¶
- activity.go
- auth_settings.go
- autosearch_retry.go
- backup.go
- backups.go
- blocklist.go
- calendar.go
- delay_profile.go
- discover.go
- download_clients.go
- env.go
- episode_files.go
- filesystem.go
- haul_history.go
- health.go
- history.go
- import.go
- importlists.go
- indexers.go
- language_preference.go
- libraries.go
- manual_import.go
- media_management.go
- media_servers.go
- notifications.go
- people.go
- providers.go
- quality_definitions.go
- quality_profiles.go
- queue.go
- recycle_bin.go
- release_profiles.go
- releases.go
- remote_path_mappings.go
- runtime.go
- series.go
- series_bulk.go
- stats.go
- system.go
- tasks.go
- unmapped_folders.go
- updates.go
- wanted.go