Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 7 additions & 11 deletions client/src/api/aria2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class Aria2Api {
async addDownload(
request: AddDownloadRequestDto
): Promise<AddDownloadResponseDto> {
return http.post(`${this.baseUrl}/add-download`, { data: request });
return http.post(`${this.baseUrl}/add-download`, { data: request, timeout: 30000 });
}

// ============ Aria2 管理相关 API (直接连接 aria2 RPC) ============
Expand Down Expand Up @@ -116,46 +116,42 @@ class Aria2Api {
* 获取任务状态
*/
async getTaskStatus(gid: string): Promise<Aria2TaskDto> {
return http.get(`${this.manageUrl}/task-status`, {
params: { gid }
});
return http.get(`${this.manageUrl}/task-status/${gid}`);
}

/**
* 获取任务详情(包含peers和文件列表)
*/
async getTaskDetail(gid: string): Promise<Aria2TaskDetailDto> {
return http.get(`${this.manageUrl}/task-detail`, {
params: { gid }
});
return http.get(`${this.manageUrl}/task-detail/${gid}`);
}

/**
* 添加 URI 下载任务
*/
async addUri(request: AddDownloadRequestDto): Promise<string> {
return http.post(`${this.manageUrl}/add-uri`, { data: request });
return http.post(`${this.manageUrl}/add-uri`, { data: request, timeout: 30000 });
}

/**
* 批量添加 URI 下载任务(每条链接创建独立任务)
*/
async batchAddUri(request: BatchAddUriRequestDto): Promise<string[]> {
return http.post(`${this.manageUrl}/batch-add-uri`, { data: request });
return http.post(`${this.manageUrl}/batch-add-uri`, { data: request, timeout: 30000 });
}

/**
* 添加种子文件下载任务
*/
async addTorrent(request: AddTorrentRequestDto): Promise<string> {
return http.post(`${this.manageUrl}/add-torrent`, { data: request });
return http.post(`${this.manageUrl}/add-torrent`, { data: request, timeout: 30000 });
}

/**
* 批量添加种子文件下载任务
*/
async batchAddTorrent(request: BatchAddTorrentRequestDto): Promise<string[]> {
return http.post(`${this.manageUrl}/batch-add-torrent`, { data: request });
return http.post(`${this.manageUrl}/batch-add-torrent`, { data: request, timeout: 30000 });
}

/**
Expand Down
3 changes: 2 additions & 1 deletion client/src/api/rssMirror.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ class RssMirrorApi {
enableKeywordFilter: boolean = false
): Promise<string> {
return http.post(`${this.baseUrl}/${id}/download-to-aria2`, {
params: { videoOnly, enableKeywordFilter }
params: { videoOnly, enableKeywordFilter },
timeout: 30000
});
}
}
Expand Down
2 changes: 1 addition & 1 deletion client/src/views/rss-mirror/items/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ const dateRange = ref<[string, string]>([]);
// 分页
const pagination = reactive({
page: 1,
pageSize: 20,
pageSize: 10,
total: 0
});

Expand Down
Loading