fix(plexpersonmeta): repair cache cleanup job registration - #366
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.
问题与背景
启用 PlexPersonMeta 的“清理缓存”开关后,插件初始化阶段会注册一次性缓存清理任务,但插件无法正常加载。
原因分析
清理任务通过 APScheduler 按无参数函数注册,而
ScrapeHelper.clear_cache的静态方法签名错误地要求一个self参数,导致 APScheduler 在注册任务时抛出ValueError: The following arguments have not been supplied: self。解决方案
2.2更新为2.3,同步插件类、package.v2.json、版本历史和独立 README。影响与风险
改动仅影响 PlexPersonMeta v2 的缓存清理任务和发布元数据,不涉及主程序、v1 插件或配置迁移。未启用清理缓存开关的用户行为不变;启用后将正常完成缓存清理并继续使用插件。
本 PR 按发版路径交付,包含版本升级,不包含其他插件改动。
验证
python .github/scripts/check_plugin_versions.py package.json package.v2.json:通过python -m json.tool package.v2.json:通过python -m compileall -q plugins.v2/plexpersonmeta:通过tests/run.py -q:CI 会话33 passed,v2 插件会话2209 passed.githooks/pre-push:通过