Fix AttributeError when mediainfo.type is None

Co-authored-by: jxxghp <51039935+jxxghp@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-01-24 00:04:02 +00:00
co-authored by jxxghp
parent 79710310ce
commit f3b910d55a
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -464,7 +464,7 @@ class FileManagerModule(_ModuleBase):
else:
# 未找到有效的媒体库目录
logger.error(
f"{mediainfo.type.value} {mediainfo.title_year} 未找到有效的媒体库目录,无法整理文件,源路径:{fileitem.path}")
f"{mediainfo.type.value if mediainfo.type else '未知类型'} {mediainfo.title_year} 未找到有效的媒体库目录,无法整理文件,源路径:{fileitem.path}")
return TransferInfo(success=False,
fileitem=fileitem,
message="未找到有效的媒体库目录")