An extremely simple bulk downloader script to use with streamrip
Find a file
2025-10-09 15:53:59 +02:00
README.md Update README.md 2025-10-09 15:53:59 +02:00
rip-downloader.sh forgot to add 2025-10-09 15:38:07 +02:00

rip-downloader.sh

A tiny, friendly Bash wrapper around streamrips rip CLI that batch-downloads a list of album/playlist/track URLs—one per line—from urls.txt, with clean progress output and per-item success/failure reporting.


Features

  • 📄 Reads URLs from a simple urls.txt (one URL per line)
  • 📁 Saves to a target folder you choose
  • 🎚️ Sets output codec (defaults to MP3)
  • Clear per-URL status (✓ success / ✗ failure + exit code)
  • 📊 Nice progress counter: [current/total]
  • 🧵 Streams whole albums/playlists when the URL points to one (handled by streamrip)

Prerequisites

  • Bash (tested on macOS & Linux)
  • streamrip CLI (rip command)

Install streamrip (recommended via pipx):

# If you dont have pipx:
python3 -m pip install --user pipx
python3 -m pipx ensurepath

# Install streamrip:
pipx install streamrip

Or via pip (user-site):

python3 -m pip install --user streamrip

Then configure providers (TIDAL, Qobuz, Deezer, etc.) as required by streamrip:

rip config      # guided setup; may prompt for credentials or tokens

Tip: Run rip --help to see supported codecs and options.


Installation

Add the script to your repo (e.g., at the project root):

.
├── rip-downloader.sh
└── urls.txt

Make it executable:

chmod +x rip-downloader.sh

Configuration

Open the script and adjust these variables near the top:

URL_FILE="urls.txt"        # path to your URL list
OUTPUT_DIR="/yep-yourpath" # where files will be saved
CODEC="MP3"                # preferred codec (e.g., MP3, FLAC, AAC, ALAC)

Supported codecs depend on your streamrip build and encoders. Common values: FLAC, ALAC, AAC, MP3. See rip --help.

You can also override at runtime using environment variables (no script edits needed):

URL_FILE=my-urls.txt OUTPUT_DIR="$HOME/Music/Rips" CODEC=FLAC ./rip-downloader.sh

Usage

  1. Create urls.txt with one URL per line:

    https://tidal.com/browse/album/1234567
    https://www.qobuz.com/album/awesome-record/987654321
    https://deezer.com/playlist/24680
    https://tidal.com/browse/track/13579
    
  2. Ensure your OUTPUT_DIR exists:

    mkdir -p /yep-yourpath
    
  3. Run:

    ./rip-downloader.sh
    

Example output

Found 4 URLs to download
Output directory: /yep-yourpath
Codec: MP3
----------------------------------------

[1/4] Downloading: https://tidal.com/browse/album/1234567
----------------------------------------
✓ Successfully downloaded URL 1
----------------------------------------

[2/4] Downloading: https://www.qobuz.com/album/awesome-record/987654321
----------------------------------------
✗ Failed to download URL 2 (exit code: 1)
----------------------------------------

[3/4] Downloading: https://deezer.com/playlist/24680
----------------------------------------
✓ Successfully downloaded URL 3
----------------------------------------

[4/4] Downloading: https://tidal.com/browse/track/13579
----------------------------------------
✓ Successfully downloaded URL 4
----------------------------------------

All downloads completed!
Total processed: 4 URLs

How it works

  • Validates urls.txt exists and the output directory is present

  • Counts non-empty lines to compute total work

  • Loops over each URL:

    • Calls rip --codec "$CODEC" --folder "$OUTPUT_DIR" url "$url"
    • Captures the exit code and prints ✓/✗
  • Prints a final summary

The “recursive” behavior (albums, playlists) is handled by streamrip: when given an album/playlist URL, rip traverses tracks and downloads them all.


License

MIT License