Files
gitlab-instance-0a899031_sh/d2ypp2/readme2.txt
root 07aa02bca6 s
2026-05-17 04:31:59 +00:00

42 lines
2.6 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
项目修复记录2026-05-17
1. 本次实际修复的 bug
- 单频道 YouTube / 抖音转 YouTube
旧逻辑只要检测到任意一个托管配置文件存在,就会把 `youtube.ini` 和 `URL_config.ini` 整对切到托管路径;当只生成了一半托管文件时,会把另一半旧配置绕掉,导致推流 key 或房间 URL 丢失。现已改为“按文件粒度回退”。
- 多频道 Pro
前端从服务端拉取频道列表时,空列表会被误判成“拉取失败”,随后回退到浏览器本地缓存,导致页面继续显示旧频道。现已把“成功拉到空列表”和“请求失败”区分开。
- 进程重启:
`web.py` 的重启接口原先在 `restart()` 之后再 `force_kill_ffmpeg()`,会把刚拉起的新 ffmpeg 一并杀掉。现已改为先清理旧 ffmpeg再执行重启。
- PM2 状态污染:
PM2 `start/stop/restart/resurrect` 失败时,旧代码仍会把进程标记成期望运行并保存状态,控制台会显示假在线。现已改为只有返回码为 0 才更新 desired 状态。
- PM2 自恢复卡死:
`src/web_process_backend.py` 把一些很小的本地文件读写放进 `asyncio.to_thread()`;在当前环境里这条路径会卡住,导致 PM2 进程表恢复逻辑不返回。现已改为直接同步执行这些轻量操作。
- Neko 浏览器:
`DeveloperToolsAvailability` 原来是 `2`,会直接禁用开发者工具;同时启动参数带 `--bwsi`,会破坏扩展持久化和 Tampermonkey 行为。现已改为允许 DevTools并移除 `--bwsi`。
2. 本次改动的关键文件
- 后端:
`src/youtube_config_paths.py`
`youtube.py`
`src/web_process_backend.py`
`web.py`
- 前端:
`web-console/lib/youtubeProChannels.ts`
`web-console/components/live-product/LiveYoutubeUnmannedView.tsx`
`web-console/out/*`(已重新构建静态产物)
- Neko
`services/neko/policies/policies.json`
`services/neko/google-chrome.conf`
`services/neko/chromium.conf`
`services/neko/browser-launch.sh`
3. 验证结果
- 已通过:
`python -m compileall -q src web.py youtube.py douyin_youtube_ffplay.py tests`
`python -m unittest -q tests.test_web_process_backend tests.test_web_dynamic_processes tests.test_youtube_config_paths tests.test_neko_config tests.test_youtube_push_config tests.test_youtube_pro_runtime`
- 前端已使用 Node 20 重新执行 `web-console` 构建,新的 `web-console/out` 已生成。
4. 部署注意
- `live.local` 实际运行目录不是当前仓库 `/home/eric/sh/d2ypp2`,而是 `/home/eric/d2ypp`。
- 如果只改当前目录而不把修复同步到 `/home/eric/d2ypp``live.local` 不会生效。