add downloads path

This commit is contained in:
jxxghp
2025-02-20 10:51:22 +08:00
parent 74de554fb0
commit e3f8ed9886
2 changed files with 2 additions and 0 deletions

View File

@@ -41,6 +41,7 @@ class FetchDownloadsAction(BaseAction):
download.completed = True
continue
for t in torrents:
download.path = t.path
if t.progress >= 100:
download.completed = True

View File

@@ -9,4 +9,5 @@ class DownloadTask(BaseModel):
"""
download_id: Optional[str] = Field(None, description="任务ID")
downloader: Optional[str] = Field(None, description="下载器")
path: Optional[str] = Field(None, description="下载路径")
completed: Optional[bool] = Field(False, description="是否完成")