Add video download failure reporting feature

- Introduced a new API endpoint `POST /api/v1/video/remove_watermark/report_failure` for reporting download failures.
- Added a new database table `video_download_failures` to store details about failed downloads, including domain, URL, error message, and reporting metadata.
- Updated the video handler to process failure reports and save them to the database.
- Enhanced documentation to include details about the new reporting feature and its usage.
This commit is contained in:
nepiedg
2026-01-03 23:50:30 +00:00
parent 1ad775be63
commit 49b709df9f
9 changed files with 168 additions and 5 deletions
+2 -1
View File
@@ -97,6 +97,7 @@ Authorization: Bearer <token>
- 项目已将 `SHORT_VIDEO_API_KEY``SHORT_VIDEO_FREE_QUOTA``SHORT_VIDEO_TIMEOUT_SECONDS` 等变量加入配置,可通过 `.env` 控制。
- 新增 `video_parse_logs` / `video_parse_unlocks` 表(DDL 见 `docs/sql/remove_watermark.sql`):分别记录每次解析详情和“观看广告解锁”状态。
- 新增 `video_download_failures` 表,用于记录第三方下载失败的域名、URL、错误原因、上报端 UA/IP、失败时间,方便排查白名单问题。
- 用户在登录后可使用登录接口返回的 `session_key` 作为 `Authorization: Bearer <session_key>` 调用受保护的接口。
- 成功解析后会将第三方原始响应以 JSON 形式直接写入 `video_parse_logs.third_party_payload` 字段,方便统一检索。
- API 列表和请求/响应示例详见 `docs/remove_watermark/API.md`
- API 列表和请求/响应示例详见 `docs/remove_watermark/API.md`,其中包含新的 `POST /api/v1/video/remove_watermark/report_failure` 上报接口