How nubuki-all/enc works
ENC is a Telegram bot for queueing downloads and transcoding video files, with controls for queue management, batch selection, encoding settings, and output delivery. The principal workflow begins with an authorized user submitting a file, link, or torrent; queued work is downloaded, transcoded or muxed, and uploaded or forwarded. The README also documents RSS, anime/media information, filtering and rename controls, user permissions, and operational commands. Startup code supports MongoDB or local persistence. Several subsystems are represented by their exact enclosing directories because their implementation was not sampled; those links are omitted where call wiring is unverified.
Main entry points: handlers Command handlers · transcode.py Transcode orchestration · before.py Startup and persistence · __main__.py Command dispatch
Components 23
Bot interface
- Command dispatch
bot/__main__.py - Command handlers
bot/workers/handlers
Media workflow
- Transcode orchestration
bot/workers/auto/transcode.py - Downloader
bot/workers/downloaders/download.py - Encoder
bot/workers/encoders/encode.py - Uploader
bot/workers/uploaders/upload.py - Parallel transfers
bot/utils/FastTelethon.py
State and scheduling
- Queue management
bot/workers/handlers/queue.py - Automated scheduling
bot/workers/auto/schedule.py - Status reporting
bot/workers/auto/status.py - Startup and persistence
bot/startup/before.py - Local persistence
bot/utils/local_db_utils.py - Database utilities
bot/utils/db_utils.py
Bot capabilities
- RSS subscriptions
bot/workers/handlers/manage.py - Anime information
bot/utils/ani_utils.py - Filters and renaming
bot/workers/handlers/manage.py - Management commands
bot/workers/handlers/manage.py - Utilities and messages
bot/utils
Other components
- Telegram user
- MongoDB
- Telegram API
- aria2 / qBittorrent
- FFmpeg
Connections 24
- Telegram user → Command dispatch: sends commands
- Command dispatch → Command handlers: dispatches commands
- Command handlers → Queue management: adds and manages
- Queue management → Transcode orchestration: queues media
- Transcode orchestration → Downloader: downloads input
- Downloader → aria2 / qBittorrent: fetches media
- Transcode orchestration → Encoder: encodes media
- Encoder → FFmpeg: runs command
- Transcode orchestration → Uploader: uploads output
- Uploader → Telegram API: sends media
- Downloader → Telegram API: updates progress
- Uploader → Parallel transfers: transfer support
- Command dispatch → Telegram API: registers handlers
- Startup and persistence → MongoDB: loads state
- Startup and persistence → Local persistence: loads fallback
- Startup and persistence → Database utilities: initializes persistence
- Automated scheduling → Queue management: schedules work
- Status reporting → Telegram API: reports status
- Command handlers → RSS subscriptions: manages feeds
- RSS subscriptions → Telegram API: replies with items
- Command handlers → Anime information: requests anime data
- Command handlers → Filters and renaming: manages rules
- Command handlers → Management commands: handles controls
- Command handlers → Utilities and messages: uses utilities