🎵 DAB Music Downloader
A high-performance, modular music downloader designed for audiophiles.
Effortlessly fetch high-quality FLAC audio with comprehensive metadata, embedded artwork, and smart organization from the DAB API.
📖 Table of Contents
- ✨ Features
- 📸 Screenshots
- 📋 Prerequisites
- 🚀 Installation
- 📖 Detailed Command Guide
- ⚙️ Configuration
- 🛠️ Development
- ⚖️ Legal Disclaimer
✨ Features at a Glance
🚀 Core Experience
- High-Fidelity Audio: Downloads pristine FLAC files directly from source.
- Smart Metadata: Automatically tags files with Title, Artist, Album, Genre, Year, ISRC, and more via MusicBrainz.
- Format Conversion: Built-in support for converting to MP3, OGG, or Opus on the fly.
- Batch Downloading: Process multiple URLs or search queries from a simple text file.
- Interactive TUI: Navigate search results and select multiple items with a modern, terminal-based user interface.
- Configuration Editor: Manage your settings interactively without manual JSON editing.
🔗 Integrations
- Spotify: Import and download entire playlists or albums directly.
- ListenBrainz: Import tracks from ListenBrainz JSPF playlists.
- Navidrome: Seamlessly sync downloaded content to your Navidrome media server.
- MusicBrainz: Enhances metadata accuracy with advanced database lookups and caching.
📸 Screenshots
Interactive search with multi-selection support.
Parallel downloads with detailed progress tracking.
📋 Prerequisites
- Go 1.24+ (if building from source)
- FFmpeg (required for format conversion and metadata processing)
- Network access to DAB API and optionally Spotify/Navidrome.
🚀 Installation
Option 1: One-Line Installer (Linux/macOS)
The fastest way to install or update is using our installation script:
curl -fsSL https://raw.githubusercontent.com/PrathxmOp/dab-downloader/main/install.sh | bashOption 2: One-Line Installer (Windows PowerShell)
Run the following in PowerShell (as Administrator if you want to update PATH for all users, otherwise User PATH is used):
iwr -useb https://raw.githubusercontent.com/PrathxmOp/dab-downloader/main/install.ps1 | iexOption 3: Pre-built Binaries
- Visit the Releases Page.
- Download the binary matching your OS and architecture (e.g.,
dab-downloader-linux-amd64). - (Linux/macOS) Make it executable and move it to your path:
chmod +x dab-downloader-linux-amd64 mkdir -p ~/.local/bin mv dab-downloader-linux-amd64 ~/.local/bin/dab-downloader
Option 3: Docker
docker run -it -v $(pwd)/music:/music -v $(pwd)/config:/app/config prathxm/dab-downloader search "The Weeknd"📖 Detailed Command Guide
🌍 Global Persistent Flags
These flags can be used with any command:
--api-url string: Override the DAB API URL.--download-location string: Directory where music will be saved.--debug: Enable verbose debug logging.--insecure: Skip TLS certificate verification (useful for local Navidrome setups).--warnings string: Set warning behavior:immediate,summary(default), orsilent.
🔐 Authentication
login [email] [password]
Authenticates your session with the DAB API.
dab-downloader login user@example.com mypasswordlogout
Clears the locally stored session token.
status
Checks if you are currently logged in and if the session is valid.
🎵 Download & Search Commands
search [query]
Search for artists, albums, or tracks using an interactive TUI.
- Smart Selection: When selecting a single track, the CLI will offer to download the entire containing album.
--type string: Type of content to search for (artist,album,track,all). Default:all.--auto: Automatically download the first result.--expand: Automatically download the full album for the selected track (skips interactive prompt).--format string: Target format (flac,mp3,ogg,opus). Default:flac.--bitrate string: Bitrate for lossy formats (e.g.,320). Default:320.
dab-downloader search "Interstellar" --type albumartist [artist_id]
Download an artist's entire discography.
--filter string: Filter by type, comma-separated (e.g.,albums,eps,singles). Default:all.--no-confirm: Skip the confirmation prompt before starting downloads.--format/--bitrate: Conversion settings.
dab-downloader artist "12345" --filter "albums"album [album_id]
Download a specific album by its ID or shared URL.
--format/--bitrate: Conversion settings.
dab-downloader album "67890" --format mp3playlist [playlist_id]
Download a DAB playlist by its ID or shared URL.
--format/--bitrate: Conversion settings.
dab-downloader playlist "344f44f8-..."batch [file_path]
Process multiple downloads from a text file (one item per line). Supports Spotify URLs, DAB URLs, and search queries.
--expand: Automatically download the full album for any tracks found via search or URLs.
dab-downloader batch my_list.txt --expand🔗 Integrations
spotify [url]
Download music from a Spotify playlist or album URL.
--expand: Instead of downloading individual tracks, search for and download the full albums containing those tracks.--auto: Auto-select first search result on DAB.
dab-downloader spotify "https://open.spotify.com/playlist/..." --expandlistenbrainz [url]
Download tracks from a ListenBrainz playlist URL.
--auto: Automatically download the first result found on DAB.--format/--bitrate: Conversion settings.
dab-downloader listenbrainz "https://listenbrainz.org/playlist/..."navidrome [playlist_url]
Sync a Spotify or ListenBrainz playlist to your Navidrome server. It searches for tracks on your Navidrome server, downloads missing ones from DAB, and adds them to a Navidrome playlist.
--ignore-suffix string: Ignore specific suffixes in track titles during matching (e.g., "Remastered").--expand: Expand playlist to full albums.
dab-downloader navidrome "https://open.spotify.com/playlist/..."
# OR
dab-downloader navidrome "https://listenbrainz.org/playlist/..."add-to-playlist [playlist_id] [song_id...]
Directly add one or more track IDs to a Navidrome playlist.
🛠️ Debugging & Utilities
debug api-availability
Test basic connectivity to the DAB API.
debug artist-endpoints [artist_id]
Test various API endpoint formats for a specific artist ID.
debug comprehensive-artist-debug [artist_id]
Run a full diagnostic suite for a specific artist ID.
config
Open the interactive Configuration Editor to manage your settings.
version
Print the current version of dab-downloader.
⚙️ Configuration
dab-downloader uses a config.json file to store your preferences. You can edit this file manually or use the interactive editor:
dab-downloader config📂 Configuration Locations
The application looks for configuration in the following order:
- Portable Mode: A
config/directory next to the binary. - Standard Location:
- Linux/macOS:
~/.config/dab-downloader/config.json - Windows:
%AppData%\dab-downloader\config.json
- Linux/macOS:
- Docker:
/config/config.json(inside the container).
🛡️ Key Settings
- Parallelism: Number of simultaneous downloads (default:
5). - Verify Downloads: When enabled, the application verifies the integrity of each download by comparing the file size on disk with the expected size from the API. Corrupted or partial files are automatically deleted to keep your library clean.
- Format/Bitrate: Default settings for audio conversion.
📝 Sample Configuration
{
"APIURL": "https://dabmusic.xyz",
"DownloadLocation": "/home/user/Music",
"Parallelism": 5,
"Format": "flac",
"Bitrate": "320",
"SpotifyClientID": "...",
"SpotifyClientSecret": "...",
"NavidromeURL": "...",
"NavidromeUsername": "...",
"NavidromePassword": "...",
"naming": {
"album_folder_mask": "{artist}/{album}",
"file_mask": "{track_number} - {title}"
}
}🛠️ Development
This project follows a modular structure:
cmd/dab-downloader/: CLI entry point.internal/: Core business logic (api, downloader, ffmpeg, models, ui, utils).pkg/: Reusable integration packages (spotify, navidrome, musicbrainz).
🧪 Running Tests
go test ./internal/...⚖️ Legal Disclaimer
For Educational Purposes Only. Users are strictly responsible for complying with local copyright laws and respecting terms of service of third-party platforms.