How theotherp/nzbhydra2 works
NZBHydra 2 is a meta-search service for Usenet indexers and Torznab trackers, also exposing an indexer-compatible API to automation clients. Users search from the GUI or an external client; Hydra queries configured sources, aggregates and filters results, then presents them or supports downloading through configured downloaders. The README documents the main capabilities, but most backend search and download implementations were not sampled, so those relationships are cited to the README rather than inferred from imports.
Main entry points: searching Search orchestration · routes.tsx Configuration UI · downloading Download handling · App.tsx React application
Components 20
Access and UI
- React application
core/ui-react/src/App.tsx - External API
core/src/main/java/org/nzbhydra/externalapi/ExternalApiV1Controller.java - Authentication
core/src/main/java/org/nzbhydra/auth/SecurityConfig.java
Search and results
- Search orchestration
core/src/main/java/org/nzbhydra/searching - Query mapping
core/src/main/java/org/nzbhydra/searching/CustomQueryAndTitleMappingHandler.java - Media ID lookup
core/src/main/java/org/nzbhydra/mediainfo - Indexer adapters
core/src/main/java/org/nzbhydra/indexers - Result aggregation
core/src/main/java/org/nzbhydra/searching - Search result storage
core/src/main/java/org/nzbhydra/searching/db/SearchResultRepository.java
Downloads and history
- History and statistics
core/src/main/java/org/nzbhydra/historystats - Download handling
core/src/main/java/org/nzbhydra/downloading - Downloader integrations
core/src/main/java/org/nzbhydra/downloading/downloaders - Torrent handling
core/src/main/java/org/nzbhydra/downloading/torrents - History and stats UI
core/ui-react/src/features/stats/routes.tsx
Configuration and operations
- Configuration
core/src/main/java/org/nzbhydra/config/ConfigProvider.java - External tool sync
core/src/main/java/org/nzbhydra/externaltools/ExternalToolsSyncService.java - Backup and restore
core/src/main/java/org/nzbhydra/backup/BackupAndRestore.java - Configuration UI
core/ui-react/src/features/config/routes.tsx
Other components
- GUI user
- Automation client
Connections 21
- GUI user → React application: searches
- Automation client → External API: requests search
- React application → Search orchestration: submits query
- External API → Search orchestration: routes search
core/src/main/java/org/nzbhydra/externalapi/ExternalApiV1Controller.java - Search orchestration → Query mapping: maps query
core/src/main/java/org/nzbhydra/searching/CustomQueryAndTitleMappingHandler.java - Search orchestration → Media ID lookup: resolves media IDs
- Search orchestration → Indexer adapters: queries sources
- Indexer adapters → Result aggregation: returns matches
- Result aggregation → Search result storage: persists results
- Result aggregation → React application: displays results
- Result aggregation → External API: serves results
core/src/main/java/org/nzbhydra/externalapi/ExternalApiV1Controller.java - Configuration UI → Configuration: edits settings
- Search orchestration → Configuration: uses settings
core/src/main/java/org/nzbhydra/searching/CustomQueryAndTitleMappingHandler.java - History and stats UI → History and statistics: requests history
- History and statistics → Search result storage: reads search data
- GUI user → Download handling: requests download
- Download handling → Downloader integrations: submits NZB
- Download handling → Torrent handling: handles torrents
- Configuration → External tool sync: configures sync
core/src/main/java/org/nzbhydra/externaltools/ExternalToolsSyncService.java - Configuration UI → External tool sync: configures tools
- Configuration UI → Backup and restore: manages backups