How kroeberd/alldebrid-client works
AllDebrid-Client is a self-hosted torrent automation app. Users and media managers submit torrents through the web UI, qBittorrent-compatible API, or search integrations; the manager applies rules and coordinates AllDebrid upload, aria2 download, and completion work. Supporting branches provide scheduling, monitoring, notifications, and administration. The README documents the main lifecycle and several capabilities whose internal wiring is not shown here; those edges cite the README rather than implying unsampled calls.
Main entry points: manager_v2.py Torrent manager · database.py Torrent database · scheduler.py Background scheduler · routes.py REST API
Components 25
Inputs and API
- Web UI
frontend/static/app.js - REST API
backend/api/routes.py - qBittorrent API
backend/api/qbit.py - Indexer search
backend/services/jackett.py - Prowlarr search
backend/services/prowlarr.py
Torrent lifecycle
- Torrent manager
backend/services/manager_v2.py - Pre-upload rules
backend/services/rules.py - Lifecycle state
backend/services/torrent_state.py - AllDebrid API
backend/services/alldebrid.py - aria2 RPC client
backend/services/aria2.py - Built-in aria2
backend/services/aria2_runtime.py - Archive extraction
backend/services/extractor.py
Operations and data
- Torrent database
backend/db/database.py - Application settings
backend/core/config.py - Background scheduler
backend/core/scheduler.py - Statistics and analytics
backend/services/stats.py - Queue analytics
backend/services/analytics.py - Backups and maintenance
backend/services/backup.py
Integrations and outputs
- Discord notifications
backend/services/notifications.py - Lifecycle webhooks
backend/services/webhook_actions.py - FlexGet tasks
backend/services/flexget.py - Plex / Jellyfin
backend/services/media_server.py
Other components
- User
- Sonarr / Radarr
- Media servers
Connections 31
- User → Web UI: submits torrents
README.md - Web UI → REST API: calls API
- Sonarr / Radarr → qBittorrent API: uses qBit API
README.md - User → REST API: submits torrents
README.md - User → Indexer search: searches indexers
README.md - User → Prowlarr search: searches indexers
README.md - Indexer search → Torrent manager: adds results
- Prowlarr search → Torrent manager: adds results
- REST API → Torrent manager: adds torrents
backend/api/routes.py - qBittorrent API → Torrent manager: delegates torrent work
backend/api/qbit.py - Torrent manager → Pre-upload rules: evaluates rules
backend/services/manager_v2.py - Torrent manager → Lifecycle state: validates transitions
backend/services/manager_v2.py - Torrent manager → AllDebrid API: uploads and polls
backend/services/manager_v2.py - Torrent manager → aria2 RPC client: dispatches downloads
backend/services/manager_v2.py - Built-in aria2 → aria2 RPC client: checks RPC
backend/services/aria2_runtime.py - Torrent manager → Archive extraction: extracts completed files
backend/services/manager_v2.py - Torrent manager → Torrent database: reads and writes
backend/services/manager_v2.py - Torrent manager → Discord notifications: sends event notices
backend/services/manager_v2.py - Torrent manager → Lifecycle webhooks: fires lifecycle events
backend/services/manager_v2.py - Torrent manager → Plex / Jellyfin: refreshes libraries
backend/services/manager_v2.py - Plex / Jellyfin → Media servers: requests library refresh
README.md - Background scheduler → Torrent manager: runs background tasks
backend/core/scheduler.py - Background scheduler → Backups and maintenance: schedules backups
backend/core/scheduler.py - Background scheduler → FlexGet tasks: schedules tasks
backend/core/scheduler.py - Statistics and analytics → Torrent database: reads statistics
backend/services/stats.py - Queue analytics → Torrent database: reads analytics data
backend/services/analytics.py - Backups and maintenance → Torrent database: backs up data
backend/services/backup.py - Torrent manager → Application settings: reads settings
backend/services/manager_v2.py - Discord notifications → Application settings: reads webhook settings
backend/services/notifications.py - Lifecycle webhooks → Application settings: reads webhook settings
backend/services/webhook_actions.py - User → FlexGet tasks: triggers tasks
README.md