mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-07 16:36:53 +08:00
Fix: Ensure parent item exists before saving NFO file
Co-authored-by: jxxghp <jxxghp@163.com>
This commit is contained in:
@@ -492,6 +492,8 @@ class MediaChain(ChainBase):
|
|||||||
movie_nfo = self.metadata_nfo(meta=meta, mediainfo=mediainfo)
|
movie_nfo = self.metadata_nfo(meta=meta, mediainfo=mediainfo)
|
||||||
if movie_nfo:
|
if movie_nfo:
|
||||||
# 保存或上传nfo文件到上级目录
|
# 保存或上传nfo文件到上级目录
|
||||||
|
if not parent:
|
||||||
|
parent = storagechain.get_parent_item(fileitem)
|
||||||
__save_file(_fileitem=parent, _path=nfo_path, _content=movie_nfo)
|
__save_file(_fileitem=parent, _path=nfo_path, _content=movie_nfo)
|
||||||
else:
|
else:
|
||||||
logger.warn(f"{filepath.name} nfo文件生成失败!")
|
logger.warn(f"{filepath.name} nfo文件生成失败!")
|
||||||
|
|||||||
Reference in New Issue
Block a user