feat: harden recording lifecycle and refresh fnOS UI

This commit is contained in:
2026-08-03 23:45:26 +08:00
parent e5b50ea85c
commit ecc737f0bd
90 changed files with 6995 additions and 1826 deletions
+10 -12
View File
@@ -163,7 +163,7 @@ ILiveDanmakuConnection
|------|------|
| FFmpeg 路径 | ffmpeg 可执行文件路径 |
| 输出根目录 | 录制文件输出根目录 |
| 输出模板 | 路径模板,支持 `{platform}` `{roomId}` `{anchor}` `{title}` `{yyyy}` `{MM}` `{dd}` `{HHmmss}` 等变量 |
| 输出模板 | 路径模板,支持 `{platform}` `{roomId}` `{anchor}` `{title}` `{sessionId}` `{yyyy}` `{MM}` `{dd}` `{HHmmss}` 等变量;已有主播/日期目录直接复用,同名文件自动追加会话短 ID,绝不静默覆盖 |
| 默认画质 | 优先选择的流画质 |
| 保存格式 | MP4 / TS |
| 保存模式 | 单文件 / 分段 |
@@ -257,37 +257,35 @@ docker compose up -d
```bash
./scripts/build-postgresql-fnos-package.sh
./scripts/build-fnos-package.sh
./scripts/smoke-postgresql-fnos-package.sh artifacts/fnos/nxsir-postgresql-15.1.0-x86_64.fpk
./scripts/smoke-postgresql-fnos-package.sh artifacts/fnos/nxsir-postgresql-15.1.1-x86_64.fpk
./scripts/smoke-fnos-package.sh \
artifacts/fnos/liverecorder-1.1.0-x86_64.fpk \
artifacts/fnos/nxsir-postgresql-15.1.0-x86_64.fpk
./scripts/smoke-fnos-migration.sh \
artifacts/fnos/liverecorder-1.1.0-x86_64.fpk \
artifacts/fnos/nxsir-postgresql-15.1.0-x86_64.fpk
artifacts/fnos/liverecorder-1.2.13-x86_64.fpk \
artifacts/fnos/nxsir-postgresql-15.1.1-x86_64.fpk
```
- 使用 fnOS 开发者平台提供的官方 `fnpack` 构建;可通过 `FNPACK=/path/to/fnpack` 指定工具路径
- 两个 FPK 都是 x86_64 原生应用,不依赖 Docker
- 先安装 `nxsir.postgresql`,再安装 Live RecorderfnOS 会通过 `install_dep_apps` 检查依赖
- Live Recorder 直接依赖 `nxsir.postgresql` 和商店版 `nodejs_v22`fnOS 会通过 `install_dep_apps` 检查并启用依赖
- PostgreSQL 共享服务只监听 `127.0.0.1:15432`,独立管理界面默认端口为 `15433`
- 每个应用经回环接入 API 获得独立数据库、独立 SCRAM 角色和随机密码;支持 pgvector
- PostgreSQL 管理界面有独立管理员登录、客户端/数据库/角色/会话管理、只读 SQL 和手动备份恢复
- Live Recorder 安装向导会要求设置自身 `admin` 密码,并填写 PostgreSQL 服务的应用接入令牌
- 从旧 fnOS 包升级时会自动迁移原内置 PostgreSQL;只有自定义转储、SHA-256 和十张业务表行数校验全部成功后才切换
- 迁移失败会继续使用旧数据库并在下次启动重试;旧数据库和迁移转储不会自动删除
- Live Recorder 1.1.0 暂时仍携带旧 PG15 运行时,仅用于升级迁移和安全回退,不会在新安装上启动第二个数据库进程
- Live Recorder 1.2.5 仅连接 PostgreSQL 共享服务,不再打包、启动或回退到原内置 PostgreSQL
- 已删除旧内置 PostgreSQL 自动迁移能力;升级前必须确认应用已经取得共享数据库凭据,遗留数据目录不会自动删除
- Node.js 由 fnOS 商店的 `nodejs_v22` 提供,使用 `/var/apps/nodejs_v22/target/bin/node`Live Recorder FPK 不再内置 Node.js
- 依赖 fnOS 系统环境同时提供 `ffmpeg``ffprobe`,安装前请先确认二者可执行
- Web 管理界面默认使用端口 `18080`
- PostgreSQL 数据位于其应用持久化目录,手动备份位于共享目录 `postgresql/backups`
- 录制文件默认保存在 fnOS 共享目录 `liverecorder/records`;可在“设置 → 录制 → 输出根目录”修改
更完整的安装、端口凭据与迁移说明见 [docs/postgresql-migration.md](docs/postgresql-migration.md)。
更完整的安装、端口凭据说明见 [docs/postgresql-migration.md](docs/postgresql-migration.md)。
其他 fnOS 应用接入共享数据库时,请直接参考 [docs/fnos-postgresql-client-integration.md](docs/fnos-postgresql-client-integration.md)。
## 验证
- `dotnet build LiveRecorder.sln --no-restore -m:1`
- `npm run build`frontend 目录)
- `npm run test:e2e`frontend 目录,覆盖 1920 / 1366 / 1024 / 768 / 390
- Docker Compose 完整部署验证通过
## 后续规划