Skip to content

v4.0.0

Latest

Choose a tag to compare

@github-actions github-actions released this 04 Nov 03:36

CAPS v4.0.0 · 中文

这次更新将歌词与直播聊天分离:主胶囊专注音乐,独立聊天岛用于查看弹幕、礼物和 SC。新增应用内扫码登录与弹幕发送、进场消息和完整的已接收事件归档,并修复歌词同步与忙碌直播间的消息丢失问题。

独立聊天岛

  • 从「设置 → 直播互动」主动打开聊天岛。窗口保持置顶,无需悬停即可查看,与主胶囊独立布局。
  • 拖动标题移动位置,拖动任意边缘或角落调整大小;右下角提供调整大小提示。聊天窗口尺寸独立记忆,再次打开时会适配当前屏幕。
  • 主胶囊不再被弹幕替换,继续显示歌词或系统状态。
  • 修复连接直播间、打开聊天岛时崩溃,以及窗口闪现后回到主胶囊后方、相互覆盖、无法拖动和圆角外残留矩形边框等问题。
  • 支持 12–28 pt 弹幕字号,贴纸随字号缩放。查看历史时可暂停自动跟随,点击「回到最新」继续。

登录、弹幕与直播事件

  • 在聊天岛内生成二维码,使用哔哩哔哩 App 扫码并确认登录;登录与发送弹幕均无需打开浏览器。
  • 登录后可在原生输入框中发送弹幕,支持回车发送。失败时保留草稿,发送状态不确定时提示先检查聊天记录,避免自动重复发送。
  • 登录凭据通过 Windows 当前用户的 DPAPI 加密保存;退出登录会删除保存的会话。
  • 显示平台实际提供的头像、粉丝勋章、舰队身份及自己的消息标记,保留 Unicode、内嵌表情和独立贴纸。
  • 新增礼物、上舰和 SC 展示,包括可用的礼物图片、数量和 SC 金额;支持新版礼物协议、交易去重及 SC 删除通知。
  • 新增进场消息,包括没有发送弹幕的观众。聊天作者显示最近活跃或上次活跃时间;B 站没有可靠的逐人离场通知,因此不会把沉默误判为离场。

消息接收、归档与响应

  • 移除接收队列满 128 条后静默丢弃消息的行为。消息接收不等待 UI 或磁盘操作,歌曲搜索继续使用独立的任务队列。
  • 按时间预算处理突发消息,减少积压,同时为歌词与交互保留处理时间;出现积压时显示待处理数量。
  • 将原始已接收弹幕、礼物、SC、进场和删除事件写入后台归档。聊天岛显示最近 200 条,较早事件仍保留在记录文件中。
  • 点击「记录文件」查看 %APPDATA%\CAPS\chat-history。不同运行实例使用独立文件夹,原始文字不会受到界面显示长度限制。
  • 写入失败会显示错误并重试;正常退出时排空归档队列。修复一条格式错误的消息导致同批有效消息被丢弃的问题。
  • 减少聊天窗口在音乐动画和登录轮询期间的不必要重绘。

歌词与队列

  • 修复 LRC 正负时间偏移未生效、空白时间行没有清除旧歌词,以及切歌加载期间错误使用上一首播放时间的问题。
  • 播放时间更新间隔从 100 ms 缩短至 25 ms,歌词切换动画缩短至 120 ms。连续拖动音量滑块时也会更新播放时间,避免歌词冻结。
  • 改善当前歌曲定位入口与播放行高亮,修复开始播放后队列面板意外变宽的问题。
  • 导出队列时可选择歌曲,支持拖动和 Shift 范围选择。重复添加已有歌曲会将其移到队尾,同时保留歌曲信息和当前播放关联。
  • Rust 源码按应用、界面、音乐、直播和平台接口分组,便于维护。

验证与边界

  • 自动测试:111 项通过,3 项需要外部服务或音频设备的测试跳过;发行构建与直播 CLI 编译通过。
  • 突发测试验证 100,000 条消息按序保留;归档测试验证 10,000 条 Unicode 记录、正常退出排空和写入失败后的恢复。这些测试不代表端到端显示延迟保证。
  • 网络断线、加入房间之前、应用被强制终止、磁盘不可用或资源耗尽时,无法承诺零丢失或零延迟。归档仅覆盖 CAPS 实际接收的事件,不会自动补齐服务器端缺口。
  • 平台隐藏的身份无法恢复;动画贴纸目前显示首帧。扫码确认、真实弹幕发送和现场显示延迟仍需使用实际账号与直播间验证。

CAPS v4.0.0 · English

This update separates music and live chat: the main capsule keeps lyrics visible while an independent chat island shows messages, gifts, and Super Chats. It adds in-app QR sign-in and messaging, room arrivals, received-event archives, and fixes for lyric timing and message loss in busy rooms.

Independent chat island

  • Open chat explicitly from Settings → Live chat. Its independent window stays on top and remains visible without hovering.
  • Drag the title to move it, or any edge or corner to resize it. A lower-right grip makes resizing discoverable. Window size is remembered separately and fitted to the current screen when reopened.
  • Live messages no longer replace lyrics or system stats in the main capsule.
  • Fixed crashes when connecting or opening chat, windows flashing back behind the main capsule, overlapping window positions, broken dragging, and rectangular outlines around rounded corners.
  • Configure message text from 12 to 28 pt, with stickers scaling alongside it. Pause following to read history and choose Latest to resume.

Sign-in, messaging, and live events

  • Generate a QR code inside chat, scan it with the Bilibili app, and confirm on your phone. Sign-in and message sending do not open a browser.
  • Send through the native composer using Enter or Send. Failures preserve the draft; uncertain delivery asks you to check history instead of retrying automatically.
  • Saved sessions use Windows per-user DPAPI encryption. Signing out removes the remembered session.
  • Show available avatars, fan medals, guard badges, and your own-message marker, with Unicode, inline emotes, and standalone stickers.
  • Added gifts, guard purchases, and Super Chats with available images, quantities, and prices. New gift packets, transaction deduplication, and SC deletion notifications are supported.
  • Show reported room arrivals, including viewers who never send messages. Authors have recent-activity or last-seen labels. Silence is not treated as departure because reliable per-viewer leave events are unavailable.

Delivery, archives, and responsiveness

  • Removed silent message drops when the 128-event receive queue filled. Reception does not wait for UI work or disk writes; song searches retain their separate work queue.
  • Process bursts within a time budget while leaving time for lyrics and input. Pending-event counts make catch-up visible.
  • Archive raw received chat, gifts, SCs, arrivals, and deletion events in the background. The live window shows the latest 200 entries; older received events remain in the archive.
  • Choose Archive to reveal %APPDATA%\CAPS\chat-history. Separate run folders prevent app instances from overwriting each other, and original text is retained beyond display-length limits.
  • Storage errors are visible and retried. Normal exit drains pending archive records. Malformed messages no longer discard valid adjacent messages in the same batch.
  • Reduced unnecessary chat redraws during music animation and account polling.

Lyrics and queue improvements

  • Honor positive and negative LRC offsets, clear lyrics at empty timed cues, and avoid using the previous track's clock while a replacement loads.
  • Publish playback position every 25 ms instead of 100 ms and shorten lyric transitions to 120 ms. Continuous volume-slider input also updates the clock instead of freezing displayed lyrics.
  • Improved current-song navigation and highlighting, and fixed queue-panel width changes when playback starts.
  • Select songs before exporting a queue, including drag and Shift range selection. Re-adding an existing track moves it to the queue's end while preserving metadata and playback identity.
  • Organized Rust modules by application, UI, music, live chat, and provider responsibilities.

Validation and limits

  • 111 automated tests passed; 3 requiring external services or audio hardware were skipped. The release build and live-chat CLI compile check passed.
  • Burst coverage verifies 100,000 ordered events. Archive coverage verifies 10,000 Unicode records, shutdown draining, and recovery after a write failure. These are internal checks, not end-to-end display-latency guarantees.
  • Network gaps, events before joining, forced termination, unavailable storage, and resource exhaustion prevent an absolute zero-loss or zero-delay guarantee. Archives contain events CAPS actually receives and do not automatically recover server-side gaps.
  • Masked identities cannot be restored; animated stickers currently show their first frame. Real phone confirmation, message delivery, and live display latency still need verification with an account and room.