完成基础的下载功能
This commit is contained in:
parent
c049cff734
commit
248559568c
@ -306,8 +306,7 @@ class PikPakFileSystem:
|
|||||||
await self._remove_node(node)
|
await self._remove_node(node)
|
||||||
|
|
||||||
async def MakeDir(self, path : str) -> None:
|
async def MakeDir(self, path : str) -> None:
|
||||||
father_path, son_name = await self._path_to_father_node_and_son_name(path)
|
father, son_name = await self._path_to_father_node_and_son_name(path)
|
||||||
father = await self._path_to_node(father_path)
|
|
||||||
result = await self._pikpak_client.create_folder(son_name, father.id)
|
result = await self._pikpak_client.create_folder(son_name, father.id)
|
||||||
id = result["file"]["id"]
|
id = result["file"]["id"]
|
||||||
name = result["file"]["name"]
|
name = result["file"]["name"]
|
||||||
|
@ -262,7 +262,7 @@ class TaskManager:
|
|||||||
while True:
|
while True:
|
||||||
status = await tellStatus(task.gid)
|
status = await tellStatus(task.gid)
|
||||||
if status in {Aria2Status.REMOVED, Aria2Status.ERROR}:
|
if status in {Aria2Status.REMOVED, Aria2Status.ERROR}:
|
||||||
self.file_download_status = FileDownloadTaskStatus.PENDING
|
task.file_download_status = FileDownloadTaskStatus.PENDING
|
||||||
raise Exception("failed to query status")
|
raise Exception("failed to query status")
|
||||||
elif status == Aria2Status.PAUSED:
|
elif status == Aria2Status.PAUSED:
|
||||||
await unpause(task.gid)
|
await unpause(task.gid)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user