Skip to content

fix: 修复弹幕匹配和缓存逻辑问题#233

Closed
Troray wants to merge 2 commits intomtvpls:mainfrom
Troray:fix/danmaku-cache-mismatch
Closed

fix: 修复弹幕匹配和缓存逻辑问题#233
Troray wants to merge 2 commits intomtvpls:mainfrom
Troray:fix/danmaku-cache-mismatch

Conversation

@Troray
Copy link
Copy Markdown
Contributor

@Troray Troray commented Mar 23, 2026

  • 修复手动选择弹幕时与实际播放的集数不匹配的问题
  • 修复openlist源剧集弹幕无法正确匹配的问题
  • 缓存检查时验证episodeId防止返回错误缓存
  • 集数提取新增模糊匹配支持

- 修复手动选择弹幕时显示错误内容的问题
- 修复openlist源剧集弹幕无法正确匹配的问题
- 缓存检查时验证episodeId防止返回错误缓存
- 集数提取新增模糊匹配支持
@Troray
Copy link
Copy Markdown
Contributor Author

Troray commented Mar 23, 2026

当前的问题是:

  1. 手动选择弹幕显示错误内容:用户手动搜索并选择正确的集数弹幕(如第140集),但播放器显示的却是第一集的弹幕内容
  2. 自动匹配集数错误:从"私人影库"(openlist)进入,第一个集数是第140集,但自动匹配到的弹幕是第001集
  3. 番外剧集导致索引错位:在连续剧集中插入番外(如"番外上"、"番外下"),导致后续剧集的弹幕无法正确匹配

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

此PR旨在修复弹幕匹配和缓存逻辑中的问题,以提高弹幕的准确性和用户体验。主要通过改进集数提取的匹配策略和增加缓存验证机制来实现。

Highlights

  • 弹幕匹配修复: 修复了手动选择弹幕时与实际播放的集数不匹配的问题,以及openlist源剧集弹幕无法正确匹配的问题。
  • 缓存优化: 增加了缓存检查时验证episodeId的逻辑,防止返回错误的缓存数据。
  • 集数提取增强: 为集数提取新增了模糊匹配支持,以适应更多格式。

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist
Copy link
Copy Markdown

Warning

Gemini encountered an error creating the review. You can try again by commenting /gemini review.

@mtvpls
Copy link
Copy Markdown
Owner

mtvpls commented Mar 24, 2026

为何会加载两次弹幕,还有这个超大的mtv.zip是啥,怎么不从git仓库中彻底清理掉

@Troray
Copy link
Copy Markdown
Contributor Author

Troray commented Mar 24, 2026

为何会加载两次弹幕,还有这个超大的mtv.zip是啥,怎么不从git仓库中彻底清理掉

这个mtv.zip是我本地打包发到nas上进行调试测试用的,不小心混入并且一起提交了。
加载两次弹幕的bug已经修复。
为了保持commit 历史干净,我将关闭这个PR,提交新的 PR

@Troray Troray closed this Mar 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants