feat: add direct links download functionality

- Implemented a new task type for handling direct links downloads.
- Added command handler for downloading multiple links via /dl command.
- Introduced progress tracking for direct link downloads.
- Enhanced filename parsing to support various encoding scenarios.
- Updated enums to include direct links as a task type.
- Refactored existing task structures to accommodate new functionality.
- Improved error handling and logging throughout the download process.
This commit is contained in:
krau
2025-12-08 17:10:41 +08:00
parent 32cc1e4b5a
commit c21ff7e499
21 changed files with 804 additions and 44 deletions
+3 -3
View File
@@ -19,9 +19,9 @@ type Task struct {
Stor storage.Storage
StorPath string
item *parser.Item
httpClient *http.Client
progress ProgressTracker
stream bool
httpClient *http.Client // [TODO] btorrent support?
progress ProgressTracker
stream bool
totalResources int64
downloaded atomic.Int64 // downloaded resources count