- 每个资源一个 APIRouter;不存在、冲突、输入错误、网盘暂时不可用分别回 404 / 409 / 422 / 503,其余错误只回通用说明 - 访问守卫:没设密码时只接受本机 Host;拒绝跨站写请求;挂在路径前缀下也生效;接口文档移到 /api/docs 并要求登录 - 登录限流按代理转发的真实地址计数(REELAY_FORWARDED_ALLOW_IPS),密码校验放到线程里,失败记录有上限 - 115 cookie 先验证再保存;删除前端不用的接口,GET /api/config 不再返回配置原文 - 实时推送只在有订阅者时轮询,登出后结束推送 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Reelay
Turn the releases that scroll past in Telegram into an organized media library on your 115 drive.
Self-hosted · AI recognition · You decide · Every transfer verified
简体中文 · English
The channels and bots you follow post a flood of releases every day, and you only want a few of them. Reelay watches them with your own Telegram account. An LLM reads each message to work out the title, season, episodes and release details, and TMDB plus the actual files in the share double-check it. When you tap Save in Telegram, Reelay saves the share into your own 115 cloud drive and renames and files it the way Jellyfin / Emby expect. The next time you open your media server, the new episode is already there.
Set it up once in the web console; after that, approving, correcting, following shows and reading the daily report all happen in Telegram.
Reel + Relay: relaying releases from your message feed into your library.
Note
The web console, Telegram messages and the documentation are in Simplified Chinese. The examples below are translated.
✨ Highlights
🧠 Understands messagesAI reads title, episodes and release details; TMDB fixes the title. Rules take over when AI is down. |
📱 Done in TelegramSave, reroute or follow a show in one tap; fix a wrong match with one line. |
🛡️ Transfers you can trustCheckpoint before every call, verify after. Uncertain results are re-checked, never re-sent. |
🗂️ Organized on arrivalAuto-filed and renamed by template; duplicates go to you, are skipped, kept, or upgraded. |
📺 Follows shows for youNew episodes save themselves, missing ones are flagged daily, and finished seasons unsubscribe. |
🧩 Works everywhereWeb console, Telegram bot and MCP; one folder is one plugin. |
💬 What it looks like in Telegram
| Approval card | Saved notification |
|---|---|
|
|
What you can do without opening the web console:
| When | In Telegram |
|---|---|
| Recognition is wrong | Tap ✏️ Fix on the card and send one line such as title Blossoms season 2; anything you leave out stays the same. Or ask for re-recognition |
| A transfer or organize step stops | The alert offers the right buttons: verify the transfer, continue with what arrived, reorganize, delete or overwrite, retry |
| Things piled up | /pending opens each card, or approves / ignores everything at once |
| Following shows | /subs shows what's saved and missing, cancels or resumes subscriptions and handles suggestions; missing-episode reminders can be marked "don't wait" |
| Never want a title again | Tap ⛔ Stop receiving on the card; /ignored brings it back |
| How is it running | /status for an overview; a daily report arrives every day |
| Just ask | With AI configured: "What's pending?", "Approve these episodes of X and save them to Anime" |
Re-scanning the QR code after the 115 login expires, and all configuration, happen in the web console. See the Telegram and agents guide.
🚀 Quick start
All you need is Docker and a compose.yaml. Images are published for amd64 and arm64:
mkdir reelay && cd reelay
curl -fsSLO https://raw.githubusercontent.com/Derrors/reelay/main/compose.yaml
docker compose pull
docker compose run --rm --no-deps --user root worker chown -R 10001:10001 /app/data
docker compose up -d web # console at http://127.0.0.1:28080
Fill in Telegram, AI and 115 under Settings in the console, then log in with your personal Telegram account and start listening:
docker compose run --rm --no-deps -it worker python -m reelay.login
docker compose up -d
Then add the channels or bots to watch under Settings → Sources: paste a few sample messages, let AI draft the source's rules, and tap Test recognition on the card to check the result. Where to get each account and how to verify your first release is covered in the quick start (Chinese).
Without Docker, or try a simulation first
Simulation mode runs the whole pipeline on an in-memory database with built-in sample messages, with no accounts needed:
git clone https://github.com/Derrors/reelay && cd reelay
python3.12 -m venv .venv && source .venv/bin/activate
pip install -e .
python -m reelay.main --dry-run
Running directly on your machine:
pip install -e ".[all]"
(cd web && npm ci && npm run build)
python -m reelay.web # web console
python -m reelay.login # log in with your personal Telegram account
python -m reelay.main # listener and background worker (separate terminal)
🎞️ What the library looks like
Filed by category by default (or by media type, or flat). Naming templates are editable in the console, and Preview organizing shows the result before you save:
Movies/
└── Chinese Movies/
└── The Wandering Earth II (2023) [tmdbid=…]/
└── The Wandering Earth II (2023) - 4K.mkv
TV/
└── Chinese TV/
└── The Long Season (2023) [tmdbid=…]/
└── Season 01/
├── The Long Season - S01E01.mkv
└── The Long Season - S01E02.mkv
Anime/
└── Japanese Anime/
└── …
Other/
└── Documentaries/
└── …
🧭 Design
AI proposes → sources of truth verify → you decide → your decisions feed back to the AI.
AI reads messages and makes suggestions; TMDB and the real files in the share keep it honest, and anything uncertain goes to you. Every fix you make on a card makes the next recognition from the same source more accurate. Transferring, renaming and deduplication are always done by deterministic code and verified by reading back. See architecture (Chinese).
📚 Documentation
The documentation is in Chinese.
| Document | Contents |
|---|---|
| Quick start | Accounts, first launch, initial setup, verifying your first release |
| Deployment | Docker, access and security, upgrades and rollback, backups, health checks and recovery |
| Configuration | System settings, per-source recognition rules, plugin settings, secrets and runtime files |
| Telegram and agents | Control bot buttons, commands and chat; MCP for Claude and other agents |
| Plugins | Extension points, PipelineContext, calling AI, metadata conventions |
| Architecture | State machine, how AI and rules divide the work, transfer and recovery boundaries |
| Changelog | What changed in each release |
📌 Status
Note
Early (alpha). The author uses it daily, and the full manual-approval flow runs continuously on a real account. Automatic approval, many sources and long-running containers are less tested; feedback is welcome. Runs on macOS / Linux; on Windows, use Docker.
Warning
Reelay does not provide or index any content. It only processes messages your own account can see and saves to your own drive. Automating a personal Telegram account may get it banned, and calling 115 APIs too often may trigger rate limits or risk control. Read the disclaimer (Chinese) before use.
🤝 Contributing
Issues and PRs are welcome. See CONTRIBUTING for the development setup and commit conventions, and report security issues privately as described in SECURITY.
License
MIT © Derrors