mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-07 00:16:57 +08:00
fix upload api
This commit is contained in:
@@ -895,8 +895,7 @@ class FileManagerModule(_ModuleBase):
|
|||||||
def __transfer_file(self, fileitem: FileItem, mediainfo: MediaInfo,
|
def __transfer_file(self, fileitem: FileItem, mediainfo: MediaInfo,
|
||||||
source_oper: StorageBase, target_oper: StorageBase,
|
source_oper: StorageBase, target_oper: StorageBase,
|
||||||
target_storage: str, target_file: Path,
|
target_storage: str, target_file: Path,
|
||||||
transfer_type: str, over_flag: Optional[bool] = False) -> Tuple[
|
transfer_type: str, over_flag: Optional[bool] = False) -> Tuple[Optional[FileItem], str]:
|
||||||
Optional[FileItem], str]:
|
|
||||||
"""
|
"""
|
||||||
整理一个文件,同时处理其他相关文件
|
整理一个文件,同时处理其他相关文件
|
||||||
:param fileitem: 原文件
|
:param fileitem: 原文件
|
||||||
|
|||||||
@@ -450,7 +450,7 @@ class AliPan(StorageBase, metaclass=Singleton):
|
|||||||
"/adrive/v1.0/openFile/create",
|
"/adrive/v1.0/openFile/create",
|
||||||
json={
|
json={
|
||||||
"drive_id": parent_item.drive_id,
|
"drive_id": parent_item.drive_id,
|
||||||
"parent_file_id": parent_item.fileid,
|
"parent_file_id": parent_item.fileid or "root",
|
||||||
"name": name,
|
"name": name,
|
||||||
"type": "folder"
|
"type": "folder"
|
||||||
}
|
}
|
||||||
@@ -900,7 +900,7 @@ class AliPan(StorageBase, metaclass=Singleton):
|
|||||||
if folder:
|
if folder:
|
||||||
return folder
|
return folder
|
||||||
# 逐级查找和创建目录
|
# 逐级查找和创建目录
|
||||||
fileitem = schemas.FileItem(storage=self.schema.value, path="/")
|
fileitem = schemas.FileItem(storage=self.schema.value, path="/", drive_id=self._default_drive_id)
|
||||||
for part in path.parts[1:]:
|
for part in path.parts[1:]:
|
||||||
dir_file = __find_dir(fileitem, part)
|
dir_file = __find_dir(fileitem, part)
|
||||||
if dir_file:
|
if dir_file:
|
||||||
|
|||||||
Reference in New Issue
Block a user