mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-05 15:38:19 +08:00
fix upload api
This commit is contained in:
@@ -348,6 +348,8 @@ class AliPan(StorageBase, metaclass=Singleton):
|
|||||||
"""
|
"""
|
||||||
if not fileinfo:
|
if not fileinfo:
|
||||||
return schemas.FileItem()
|
return schemas.FileItem()
|
||||||
|
if not parent.endswith("/"):
|
||||||
|
parent += "/"
|
||||||
if fileinfo.get("type") == "folder":
|
if fileinfo.get("type") == "folder":
|
||||||
return schemas.FileItem(
|
return schemas.FileItem(
|
||||||
storage=self.schema.value,
|
storage=self.schema.value,
|
||||||
@@ -874,7 +876,7 @@ class AliPan(StorageBase, metaclass=Singleton):
|
|||||||
if resp.get("code"):
|
if resp.get("code"):
|
||||||
logger.debug(f"【阿里云盘】获取文件信息失败: {resp.get('message')}")
|
logger.debug(f"【阿里云盘】获取文件信息失败: {resp.get('message')}")
|
||||||
return None
|
return None
|
||||||
return self.__get_fileitem(resp, parent=f"{str(path.parent)}/")
|
return self.__get_fileitem(resp, parent=str(path.parent))
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.debug(f"【阿里云盘】获取文件信息失败: {str(e)}")
|
logger.debug(f"【阿里云盘】获取文件信息失败: {str(e)}")
|
||||||
return None
|
return None
|
||||||
|
|||||||
Reference in New Issue
Block a user