This application provides an API to download DJ sets and split them into individual tracks based on a provided SoundCloud URL and tracklist. Files are processed and stored temporarily with automatic cleanup.
- Download DJ sets from SoundCloud
- Split audio into individual tracks with metadata
- Download for individual or all tracks
- Temporary file storage with automatic cleanup
- Real-time job progress tracking
POST /api/process- Start processing a DJ setGET /api/jobs- List all jobs (paginated)GET /api/jobs/{id}- Get job status and download URLsPOST /api/jobs/{id}/cancel- Cancel a running job
GET /api/jobs/{id}/download- Download all tracks as ZIPGET /api/jobs/{id}/tracks- Get track metadata and download URLsGET /api/jobs/{id}/tracks/{trackNumber}/download- Download single track
GET /health- Server health status
-
Start the server:
docker compose up
-
Submit a processing job:
curl -X POST http://localhost:8000/api/process \ -H "Content-Type: application/json" \ -d '{ "url": "SOUNDCLOUD_URL_OF_THE_SET", "tracklist": "{\"artist\":\"Artist Name\",\"name\":\"Mix Name\",\"tracks\":[{\"artist\":\"Artist 1\",\"name\":\"Track 1\",\"start_time\":\"00:00\",\"end_time\":\"03:45\"},{\"artist\":\"Artist 2\",\"name\":\"Track 2\",\"start_time\":\"03:45\",\"end_time\":\"07:30\"}]}", "fileExtension": "mp3" }'
Response:
{ "message": "Processing started", "jobId": "123" } -
Check job status:
curl http://localhost:8000/api/jobs/123
Response (when completed):
{ "id": "123", "status": "completed", "progress": 100, "message": "Processing completed successfully", "tracks": [ { "track_number": 1, "name": "Track 1", "artist": "Artist 1", "download_url": "/api/jobs/123/tracks/1/download", "size_bytes": 5242880, "available": true } ], "download_all_url": "/api/jobs/123/download", "total_tracks": 2 } -
Download tracks:
# Download all tracks as ZIP curl -O -J http://localhost:8000/api/jobs/123/download # Download individual track curl -O -J http://localhost:8000/api/jobs/123/tracks/1/download
{
"url": "https://soundcloud.com/artist/set-name",
"tracklist": "{\"artist\":\"Artist Name\",\"name\":\"Mix Name\",\"tracks\":[...]}",
"fileExtension": "mp3", // Optional: mp3, m4a, wav, flac
"maxConcurrentTasks": 4 // Optional: 1-10
}{
"artist": "DJ Name",
"name": "Mix Title",
"year": 2024,
"genre": "Electronic",
"tracks": [
{
"name": "Track Name",
"artist": "Track Artist",
"start_time": "00:00:00", // Format: HH:MM:SS or MM:SS
"end_time": "03:45:00" // Optional for last track
}
]
}- Temporary Storage: Files are stored in system temp directory under
djset-server-jobs/ - Automatic Cleanup: Files older than 24 hours are automatically removed
- No Permanent Storage: Files are not permanently stored on disk
- Per-Job Directories: Each job gets its own isolated directory
Edit config/config.yaml:
log_level: -4 # Debug level
file_extension: m4a # Default output format
storage:
type: "local"
output_dir: "output" # Output directory for temporary storage