How mathewskdaniel/telqbot works
TelQbot is a Telegram interface for managing qBittorrent downloads, with optional Stremio library administration and content-folder configuration. The main path is Telegram interaction through authorization and message/callback handlers, into torrent operations and back to Telegram; background tasks also track completions and reload configuration. The graph preserves the documented torrent, folder, Stremio, access-control, and notification capabilities. Some callback and integration implementations were not excerpted, so their links are omitted or marked unverified.
Main entry points: main.py Bot startup and routing · client_repo.py Client selection · tasks.py Completion notifications and watcher · content_categories.py Content folder categories
Components 17
Telegram interface
- Bot startup and routing
src/main.py - Authorization and user context
src/bot/middlewares - Message intake
src/bot/handlers/on_message.py - Commands and menu
src/bot/handlers/common.py - Torrent management callbacks
src/bot/handlers/callbacks
Torrent and Stremio features
- Torrent intake
src/bot/handlers/content_add.py - Content folder categories
src/content_categories.py - Stremio admin actions
src/bot/handlers/callbacks/stremio_callbacks.py - Stremio admin client
src/stremio_admin.py
Clients and state
- Client selection
src/client_manager/client_repo.py - qBittorrent operations
src/client_manager/qbittorrent_manager/qbittorrent_manager.py - Redis session state
src/redis_helper/wrapper.py
Runtime configuration
- Completion notifications and watcher
src/tasks.py - Settings and user roles
src/settings/__init__.py
Other components
- Telegram user
- Telegram API
- qBittorrent Web UI
Connections 24
- Telegram user → Telegram API: sends commands
README.md - Telegram API → Bot startup and routing: delivers updates
src/main.py - Bot startup and routing → Authorization and user context: registers middleware
src/main.py - Bot startup and routing → Message intake: registers router
src/main.py - Bot startup and routing → Commands and menu: registers router
src/main.py - Bot startup and routing → Torrent management callbacks: registers routers
src/main.py - Message intake → Torrent intake: handles intake
- Torrent intake → Client selection: selects client
src/bot/handlers/content_add.py - Commands and menu → Client selection: queries torrents
src/bot/handlers/common.py - Torrent management callbacks → Client selection: manages torrents
src/bot/handlers/callbacks/pause_resume/pause_callbacks.py - Torrent intake → Content folder categories: resolves folder
src/bot/handlers/content_add.py - Bot startup and routing → Content folder categories: syncs categories
src/main.py - Content folder categories → Client selection: syncs categories
src/content_categories.py - Torrent management callbacks → Stremio admin actions: registers admin actions
src/bot/handlers/callbacks/__init__.py - Stremio admin actions → Stremio admin client: requests admin operation
- Client selection → qBittorrent operations: selects implementation
src/client_manager/client_repo.py - qBittorrent operations → qBittorrent Web UI: calls Web UI
src/client_manager/qbittorrent_manager/qbittorrent_manager.py - Bot startup and routing → Settings and user roles: loads settings
src/main.py - Bot startup and routing → Redis session state: connects state store
src/main.py - Bot startup and routing → Completion notifications and watcher: starts scheduled work
src/main.py - Completion notifications and watcher → Client selection: checks completion
src/tasks.py - Completion notifications and watcher → Redis session state: tracks completion
src/tasks.py - Completion notifications and watcher → Telegram API: sends notifications
src/tasks.py - Completion notifications and watcher → Content folder categories: resyncs after reload
src/tasks.py