fix(subscribeassistantenhanced): rebuild added episodes outside full-season mode - #363
Merged
Merged
Conversation
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.
问题与背景
订阅完成后若 TMDB 增加总集数,自动纠错会根据完成快照重建新增集订阅。现有全集洗版订阅的
total_episode已同步到最新总集数时,旧逻辑会把它误判为已经接管新增集,但全集洗版只等待完整季包,并不会按集追踪新增范围。原因分析
纠错流程只比较现有订阅的目标总集数,没有区分全集洗版和普通/分集洗版语义。全集洗版因此可能短路重建并消费快照,导致新增集没有普通或分集洗版订阅继续跟踪。
解决方案
SubscribeChain.add(..., exist_ok=True)返回 ID 后回读真实订阅,校验媒体身份、季、剧集组、模式和完整新增集范围,校验失败保留快照重试。postcheck/rebuilder.py;插件入口只负责组件装配。影响与风险
已有快照继续使用原有
best_version、best_version_full字段,不新增数据结构或迁移要求。缺少模式字段的旧快照在全集默认规则下回退普通订阅。插件在旧主程序上仍会回读并校验真实订阅;若多剧集组去重返回错误订阅,纠错会保留快照而不会误报成功。建议先合并或同步使用关联的主程序剧集组身份修复。
验证
git diff --check:通过关联
package.v2.json、插件 README