XcelerateDL is a modern, high-performance download manager built with Python and FastAPI. It provides a powerful, asynchronous downloading engine capable of handling multiple concurrent downloads with intelligent bandwidth management. The application offers both a web interface and a desktop GUI mode, making it versatile for different use cases.
- β‘ High-Performance Downloads: Leverages asynchronous I/O and multi-threading for optimal download speeds
- π₯ YouTube Integration: Download videos or extract audio as MP3 using yt-dlp
- β―οΈ Download Control: Pause, resume, or cancel downloads at any time
- π Real-time Updates: Monitor download progress via WebSockets
- π Automatic File Organization: Auto-categorize downloads by file type (videos, music, documents, etc.)
- π Queue Management: Easily manage download queue with priority settings
- πΎ Persistent State: Resume downloads after application restart
- π₯οΈ Dual Interface: Use either the web UI or standalone desktop GUI
- π Bandwidth Management: Intelligently allocate bandwidth across multiple downloads
- β° Advanced Scheduling: Schedule downloads with recurrence options and smart scheduling
- π Powerful Search: Find downloads with advanced filtering options
- Quick Start
- Installation
- Usage
- API Documentation
- Configuration
- Architecture
- Development
- Contributing
- License
- Python 3.8+ (3.13 recommended)
- ffmpeg (required for YouTube downloads)
# Clone the repository
git clone https://github.com/yourusername/XcelerateDL.git
cd XcelerateDL
# Create and activate virtual environment
python -m venv venv
# On Windows:
venv\Scripts\activate
# On macOS/Linux:
source venv/bin/activate
# Install dependencies
pip install -e .
# Start the application
python -m app.main --gui
-
Clone the repository:
git clone https://github.com/yourusername/XcelerateDL.git cd XcelerateDL
-
Create and activate a virtual environment:
python -m venv venv # On Windows: venv\Scripts\activate # On macOS/Linux: source venv/bin/activate
-
Install the application and its dependencies:
pip install -e .
-
Install ffmpeg (required for YouTube downloads):
- Windows: Download ffmpeg and add it to your PATH
- macOS:
brew install ffmpeg
- Linux:
sudo apt install ffmpeg
(Debian/Ubuntu) orsudo yum install ffmpeg
(CentOS/RHEL)
-
Run the application:
python -m app.main --gui
XcelerateDL offers two operation modes:
For a complete desktop experience with a user-friendly interface:
python -m app.main --gui
This launches a desktop application with all features accessible through an intuitive interface:
- Drag and drop URLs for quick downloads
- Monitor download progress in real-time
- Organize downloads by category
- Set bandwidth limits and priorities
- Schedule downloads for off-peak hours
For headless operation or integration with other applications:
# Default configuration (host: 0.0.0.0, port: 8000)
python -m app.main
# Custom host and port
python -m app.main --api-only --host 127.0.0.1 --port 8080
After starting in API mode, access the web interface at http://localhost:8000
(or your custom host/port).
Once the server is running, access the interactive API documentation at:
- Swagger UI:
http://localhost:8000/docs
- ReDoc:
http://localhost:8000/redoc
curl -X POST http://localhost:8000/api/downloads \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/file.zip"}'
curl -X POST http://localhost:8000/api/downloads \
-H "Content-Type: application/json" \
-d '{"url": "https://youtube.com/watch?v=VIDEO_ID", "is_youtube": true, "youtube_type": "video"}'
curl -X POST http://localhost:8000/api/downloads \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/large-file.zip", "schedule": {"scheduled_time": "2023-12-31T23:00:00", "recurrence": "weekly", "days_of_week": [0, 3]}}'
# List all downloads
curl http://localhost:8000/api/downloads
# Pause a download
curl -X POST http://localhost:8000/api/downloads/{download_id}/pause
# Resume a download
curl -X POST http://localhost:8000/api/downloads/{download_id}/resume
# Delete a download
curl -X DELETE http://localhost:8000/api/downloads/{download_id}
# Pause all downloads
curl -X POST http://localhost:8000/api/downloads/pause-all
# Resume all downloads
curl -X POST http://localhost:8000/api/downloads/resume-all
# Search downloads
curl -X POST http://localhost:8000/api/downloads/search \
-H "Content-Type: application/json" \
-d '{"query": "ubuntu", "category": "compressed", "tags": ["linux"]}'
# Update bandwidth settings
curl -X POST http://localhost:8000/api/downloads/bandwidth/settings \
-H "Content-Type: application/json" \
-d '{"total_bandwidth": 10485760, "allocation_mode": "priority"}'
The bandwidth management system allows intelligent allocation of network resources:
- Equal: Each download gets an equal share of available bandwidth
- Priority: Higher priority downloads get more bandwidth (Low=1x, Normal=2x, High=4x weight)
- Custom: Specify exact percentages for individual downloads
{
"total_bandwidth": 10485760, // Total bandwidth in bytes/sec (10 MB/s)
"allocation_mode": "priority", // "equal", "priority", or "custom"
"custom_allocations": { // Only used in custom mode
"download-id-1": 60, // Percentage allocation (0-100)
"download-id-2": 20
},
"max_concurrent_downloads": 5, // Maximum number of concurrent downloads
"enable_scheduling": true, // Enable smart scheduling
"peak_hours_throttling": false, // Throttle during peak hours
"peak_hours_start": 18, // Peak hours start (6 PM)
"peak_hours_end": 23, // Peak hours end (11 PM)
"peak_hours_limit": 5242880, // Bandwidth limit during peak hours (5 MB/s)
"scheduler_check_interval": 60 // Seconds between scheduler checks
}
XcelerateDL offers a powerful scheduling system for downloads:
- One-time schedules (specific date and time)
- Recurring schedules (daily, weekly, or monthly)
- Day-of-week selection for weekly schedules
- Day-of-month selection for monthly schedules
- Per-download bandwidth allocation during scheduled times
- Peak hours detection and throttling
- Smart scheduling to distribute downloads across time periods
- Bandwidth-based scheduling to complete downloads by target time
- Auto-retry for failed scheduled downloads
- Custom schedule descriptions and notifications
XcelerateDL can be configured through:
- Command Line Arguments: Override defaults for the current session
- API Endpoints: Programmatically update settings
- Settings UI: Configure through the application interface (in GUI mode)
--gui Start the GUI version
--api-only Start only the API server
--port PORT API server port (default: 8000)
--host HOST API server host (default: 0.0.0.0)
- Download folder location
- Maximum concurrent downloads
- Default download priorities
- Speed limits
- Global bandwidth settings
- Scheduler check interval
- Peak hours configuration
XcelerateDL follows a modern, modular architecture:
- RESTful API endpoints for download management
- WebSocket support for real-time updates
- Automatic API documentation (Swagger UI and ReDoc)
- Handles download operations using asyncio
- Manages the download queue based on priority
- Processes YouTube downloads with yt-dlp
- Implements bandwidth allocation logic
- Manages scheduling system for downloads
- Manages client connections
- Broadcasts download updates in real-time
- Handles connection and disconnection events
- Uses Pydantic for strict type validation
- Ensures data integrity throughout the application
- Provides clean serialization/deserialization
- Web UI built with HTML, CSS, and JavaScript
- Desktop GUI using Eel for a native-like experience
XcelerateDL/
ββ app/ # Main application code
β ββ api/ # API endpoints
β β ββ downloads.py # Download-related endpoints
β ββ models/ # Data models
β β ββ download.py # Download and related models
β ββ services/ # Business logic
β β ββ downloader.py # Download manager service
β β ββ ws_manager.py # WebSocket manager
β ββ static/ # Static assets for web UI
β β ββ css/ # CSS styles
β β ββ js/ # JavaScript code
β β ββ images/ # UI images
β ββ templates/ # HTML templates
β β ββ index.html # Main UI template
β ββ gui.py # GUI implementation
β ββ main.py # Application entry point
ββ docs/ # Documentation
ββ downloads/ # Default download directory
ββ pyproject.toml # Project metadata and dependencies
ββ README.md # Project overview
# Start with auto-reload for API development
python -m app.main --api-only --host 127.0.0.1 --port 8000
# Start GUI mode
python -m app.main --gui
To clean all downloads (useful during development):
# On Windows
delete_downloads.bat
# On macOS/Linux
rm -rf downloads/*
Contributions are welcome! Here's how you can contribute:
- Fork the repository
- Create a feature branch:
git checkout -b my-new-feature
- Make your changes
- Add tests for your changes
- Run the existing tests to ensure nothing breaks
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request
- Follow PEP 8 guidelines for Python code
- Use type hints wherever possible
- Document functions and classes with docstrings
- Format code with the project's formatter
This project is licensed under the MIT License - see the LICENSE file for details.