Repository navigation
feat(bilibili): item edit — 更换视频与修改已投稿件 - #34
Merged
Merged
Conversation
12 of 21 tasks
Moosphan
force-pushed
the
feat/bilibili-item-edit
branch
from
November 1, 2026 03:28
2cb9ea8 to
33c30ec
Compare
Contributor
Author
|
已 rebase 到最新 master(bcc72f8),解决了一处冲突: 测试范围与结果:
改动:7 files,+85 / -3;新增 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
Catbus 的 B 站端只有
item publish(新建投稿)和item delete(撤稿,且要过极验),没有「编辑已投稿件 / 更换视频」的能力。实际使用中很常见:稿件已发布,只想换一版成片或改标题/简介/封面,不想删稿重发(会丢播放、评论和审核状态)。B 站创作中心网页端的「更换视频」走的是同一个
x/vu/web/edit接口:先按 upos 流程上传新文件拿到filename和biz_id(即cid),再提交完整 archive 字段。本 PR 把它做成catbus bilibili item edit。命令
catbus bilibili item edit BV1xx411c7mD --video new.mp4 [--title ...] [--text ...] [--cover ...] [--tag ...] [--category ...] [--visibility public|private]--video:给出时上传并替换视频;不给则只改资料(但当前实现要求必须给--video,避免误改)Item,status为reviewing(B 站会重新审核)实现
api.ts:新增archiveDetail(读x/web/archives,兼容审核中的arc_audits)与editArchive(x/vu/web/edit,web_os: 1)commands.ts:itemEdit,复用resolveItem、uploadVideo、uploadCover、readMediaindex.ts:注册扩展命令(summary / args / auth / output / options)AGENTS.md4.7、.claude/skills/catbus/platforms/bilibili.md、docs/capabilities.md与注册表测试验证
npm run typecheck、npm run build通过npm test:1030 passed;5 个失败集中在bilibili-geetest/jd(模型资源相关,未改这些模块)node dist/cli/main.js bilibili item edit --help正常x/vu/web/edit返回code: 0,稿件进入「审核中」。为避免重复提交,没有再用命令本身跑第二次。已知边界
cid/ 时长在审核通过前可能仍是旧值videos数组需要后续扩展