fix: 支持目录配置匹配多个媒体类别 - #6580
Closed
Tsutomu-miku wants to merge 1 commit into
Closed
Conversation
There was a problem hiding this comment.
PR-Agent Code Review
本次变更将目录媒体类别匹配扩展为支持半角或全角逗号分隔的多个类别,并统一应用于自动整理和按保存路径查找流程,同时补充了对应回归测试。未发现由本次变更引入的具体行为缺陷,无需提出审查意见。
审查提交:54cad2a
Owner
|
应该配置多个目录,但目录路径可以一致。 |
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.
问题
目录设置允许同时选择多个媒体类别,并以逗号分隔字符串保存,例如
日番,日韩剧。当前DirectoryHelper使用严格字符串相等判断目录类别,自动整理识别出的单一类别日番无法匹配该配置,最终提示“未找到有效的媒体库目录”;手动指定目标目录则可以绕过该判断。修复
get_dir()与get_download_dir_by_save_path()统一使用成员匹配测试
pytest -v tests/test_directory.py:6 passedpylint app/helper/directory.py:10.00/10python tests/run.py(Windows / Python 3.12):2413 passed, 1 skipped, 55 failed。55 个失败集中在 Windows/Linux 平台差异及既有无关模块;本 PR 新增的目录测试全部通过。CI 的 Linux 环境可进一步验证全量结果。实际环境验证
在 MoviePilot v2.15.6 容器中使用真实配置
media_category=日番,日韩剧验证:日番→ 自动匹配“动漫”目录日韩剧→ 自动匹配“动漫”目录/media/link/animePR-Agent 摘要
🤖 Generated by PR Agent at 54cad2a