-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
feat(123pan): add offline download #1911
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- 新增123网盘离线下载实现 - 添加相关API接口和常量配置 - 在路由和工具集中集成123网盘支持
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds offline download functionality for 123网盘 (123Pan) cloud storage service, complementing the existing 123_open implementation. The implementation follows the established patterns from other storage-backed offline download tools like 115 Cloud and PikPak.
Key Changes:
- Implements 123Pan offline download client with support for task submission, status tracking, and removal
- Adds API endpoints for resolving, submitting, listing, and deleting offline tasks in the 123 driver
- Integrates 123Pan into the offline download tool registry and routing system
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| server/router.go | Adds POST endpoint /set_123_pan for 123Pan offline download configuration |
| server/handles/offline_download.go | Implements Set123Pan handler for configuring 123Pan temp directory and initializing the tool |
| internal/offline_download/tool/download.go | Updates Transfer() to include "123Pan" in the list of tools that support direct transfer |
| internal/offline_download/tool/add.go | Adds logic to handle temp directory selection for 123Pan offline downloads |
| internal/offline_download/all.go | Registers the 123 offline download package via blank import |
| internal/offline_download/123/client.go | Implements the complete offline download client including AddURL, Remove, Status, and IsReady methods |
| internal/conf/const.go | Adds Pan123TempDir constant for storing the 123Pan temporary directory configuration |
| drivers/123/util.go | Adds API endpoints and implements OfflineDownload, GetOfflineTask, GetOfflineDownloadStatus, and DeleteOfflineTasks methods with supporting data structures |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- 将离线下载相关类型定义从util.go移至types.go - 更新状态获取api
Description / 描述
Motivation and Context / 背景
How Has This Been Tested? / 测试
Checklist / 检查清单
我已阅读 CONTRIBUTING 文档。
go fmtor prettier.我已使用
go fmt或 prettier 格式化提交的代码。我已为此 PR 添加了适当的标签(如无权限或需要的标签不存在,请在描述中说明,管理员将后续处理)。
我已在适当情况下使用"Request review"功能请求相关代码作者进行审查。
我已相应更新了相关仓库(若适用)。