mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-06 07:56:52 +08:00
fix log
This commit is contained in:
+3
-2
@@ -372,12 +372,13 @@ class MediaChain(ChainBase, metaclass=Singleton):
|
|||||||
try:
|
try:
|
||||||
parent_item = self.storagechain.get_parent_item(_fileitem)
|
parent_item = self.storagechain.get_parent_item(_fileitem)
|
||||||
if not parent_item:
|
if not parent_item:
|
||||||
|
logger.warn(f"无法获取 {_fileitem.path} 的上级目录!")
|
||||||
return
|
return
|
||||||
item = self.storagechain.upload_file(fileitem=parent_item, path=tmp_file, new_name=_path.name)
|
item = self.storagechain.upload_file(fileitem=parent_item, path=tmp_file, new_name=_path.name)
|
||||||
if item:
|
if item:
|
||||||
logger.info(f"已保存文件:{Path(parent_item.path) / item.name}")
|
logger.info(f"已保存文件:{item.path}")
|
||||||
else:
|
else:
|
||||||
logger.warn(f"文件保存失败:{Path(parent_item.path) / _path.name}")
|
logger.warn(f"文件保存失败:{item.path}")
|
||||||
finally:
|
finally:
|
||||||
if tmp_file.exists():
|
if tmp_file.exists():
|
||||||
tmp_file.unlink()
|
tmp_file.unlink()
|
||||||
|
|||||||
Reference in New Issue
Block a user