Skip to content
Projects

Angrido/Lidarr-YouTube-Downloader

View on GitHub

About

Lidarr YouTube Downloader: free self-hosted Docker app that auto-downloads missing albums from YouTube as tagged songs with ID3 metadata, MusicBrainz/AcoustID fingerprinting, and automatic Lidarr import. Flask + yt-dlp music automation for your home media server.

Design & Media

How these counts are measured

Measured star growth

in 24h
0
in 7 days
Collecting history
in 15 days
Collecting history
in 1 month
Collecting history

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

README.md

Original

Lidarr YouTube Downloader logo

Lidarr YouTube Downloader

The missing albums in your Lidarr library, found on YouTube.
Matched, verified, tagged and imported — from one self-hosted web app that takes its colours from your music.

Version 2.0.1 Docker ready Python 3 MIT license

Quick start  ·  Features  ·  Tour  ·  Configuration  ·  FAQ


Library: every missing album with live status and the album downloading right now

15

YouTube candidates
scored per track

AcoustID

fingerprint check
before import

MP3 · M4A · Opus

with MusicBrainz ids
and cover art

1 container

NAS, Unraid, Pi
or a VPS

✦ Features

Smart matching

The official YouTube Music album first, then up to 15 candidates per track — scored by title, duration, official channel and forbidden words.

Verified audio

Optional AcoustID fingerprinting rejects the wrong song before it ever reaches your library.

Complete tags

MusicBrainz ids the way Picard writes them, embedded covers, optional synced lyrics and ReplayGain.

Native to Lidarr

Files land in your library and Lidarr refreshes — or register the app as a Newznab indexer and SABnzbd client.

Explore

Browse new releases, charts and moods, preview any track and add it to Lidarr in two clicks.

Hands-off

A scheduler fetches new releases on its own, backs off tracks that keep failing and notifies Telegram, Discord or ntfy.


✦ A tour

Explore a whole catalog

New releases, top songs per country, trending tracks, charts and moods — with a mini player that previews anything before you download it.

Explore: new releases, top songs per country and trending tracks

One button for every album

Open an album and it is already matched to MusicBrainz through Lidarr. Add & download puts it in Lidarr and downloads it straight from the YouTube Music album you were looking at — whether it is complete, missing tracks, unmonitored or not in Lidarr yet.

Explore album page with its Lidarr status and the Download missing button

Artists, even the ones MusicBrainz doesn't know

Add an artist to Lidarr with one click. If it isn't on MusicBrainz, Add from YouTube builds a Lidarr-style Artist/Album (Year) folder for every release, with covers and an artist.jpg.

Explore artist page with albums, singles and the Add artist button

Watch it happen

Per-track progress, speed and verification, a queue you can reorder or pause, and a history you can filter by outcome and audio quality.

Downloads: now downloading card with per-track progress

Insights and settings

Insights: downloads over time, success rate and audio quality

Insights — success rate, audio quality and activity over time.

Settings organised in sections

Settings — every option in one sectioned, searchable page.


In your pocket

Dark and light themes, glass surfaces and a background that glows in the colours of the album you're looking at — with touch-sized controls and a tab bar. Add it to your home screen and it opens like an app.

The app on a phone: Explore, an album page and live downloads


✦ Quick start

1 · Describe the container in a docker-compose.yml:

services:
  lidarr-downloader:
    image: angrido/lidarr-downloader:latest
    container_name: lidarr-downloader
    ports:
      - "5005:5000"
    volumes:
      - ./config:/config
      - /DATA/Downloads:/DATA/Downloads
      - /DATA/Media/Music:/music
    environment:
      - LIDARR_URL=http://192.168.1.XXX:8686
      - LIDARR_API_KEY=your_api_key_here
      - DOWNLOAD_PATH=/DATA/Downloads
      - LIDARR_PATH=/music
      - PUID=1000
      - PGID=1000
      - UMASK=002
    restart: unless-stopped

2 · Start it:

docker compose up -d

3 · Open http://localhost:5005 — a short setup wizard checks the Lidarr connection; everything else lives in Settings.

[!TIP] The repository's docker-compose.yml also starts a bgutil PO-token provider sidecar, which avoids most "Sign in to confirm you're not a bot" errors.


✦ How it works

Step What happens
1 Sync Lidarr's missing albums are paged into a local SQLite cache, so the UI is instant.
2 Search The official YouTube Music album is tried first, then up to 15 candidates per track.
3 Score Title, duration window, official channel and forbidden words (remix, live, karaoke…).
4 Verify Optional AcoustID fingerprint against the expected MusicBrainz recording.
5 Tag Tags, MusicBrainz ids and cover art; optional .lrc lyrics, ReplayGain and XML sidecar.
6 Import Files are copied into your library and Lidarr refreshes the artist.

✦ Configuration

Variable Example Description
LIDARR_URL http://192.168.1.10:8686 Lidarr base URL (use the LAN IP)
LIDARR_API_KEY abc123… Lidarr → Settings → General
DOWNLOAD_PATH /DATA/Downloads Where new tracks are saved
LIDARR_PATH /music Your music library, as mounted in the container
PUID / PGID / UMASK 1000 / 1000 / 002 File ownership, matching Lidarr
ALLOWED_HOSTS 192.168.1.10,music.example.com Optional. When set, requests whose Host header is not listed get a 400, which blocks DNS-rebinding attacks. List every address you (or Lidarr's download-client bridge) use to reach the app; localhost is always allowed and *.example.com matches sub-domains. Empty (default) accepts any host.

Audio format and quality, parallel tracks, match threshold, forbidden words, scheduler, notifications (Telegram, Discord, ntfy), AcoustID and yt-dlp tuning are all set in Settings. Explore's default region and language come from EXPLORE_COUNTRY (default IT) and EXPLORE_LANGUAGE (default en); the chart country can also be switched right on the Explore page.

YouTube cookies — when YouTube asks you to sign in
  1. Install the Get cookies.txt LOCALLY browser extension.
  2. In a private window, sign in to a throwaway Google account.
  3. Export the cookies in Netscape format as cookies.txt.
  4. Mount it and point the app at it:
volumes:
  - ./cookies.txt:/cookies/cookies.txt
environment:
  - YT_COOKIES_FILE=/cookies/cookies.txt

Never use your main Google account: cookies expire and accounts can be flagged. The app never modifies your file — every download works on a private copy.

AcoustID fingerprinting — verify every track

Enable it in Settings and paste an AcoustID API key. The image already ships fpcalc (chromaprint).

Use as a Lidarr download client — let Lidarr drive the whole flow

The app can register inside Lidarr as a Newznab indexer and a SABnzbd download client. Lidarr then searches, grabs, monitors and imports exactly as it would with Usenet.

Surface Emulates Endpoint
Indexer Newznab /api/newznab/api
Download client SABnzbd /api/sabnzbd
  1. This app → Settings → Lidarr Download Client: enable it, Generate an API key, set a Category (default music) and save.
  2. Lidarr → Settings → Indexers → + → Newznab (custom): URL http://<this-app-host>:<port>, API Path /api/newznab/api, the API key. Test, then save.
  3. Lidarr → Settings → Download Clients → + → SABnzbd: this app's host and port, URL Base /api/sabnzbd, the same key and category. Test, then save.
  4. Lidarr → Settings → Media Management: enable Completed Download Handling.

In this mode files stay in the download folder for Lidarr to import, so that folder must be visible to Lidarr at the same path (or through a remote path mapping). Albums attempted recently are held back for scheduler_retry_after_hours (default 24 h) so a failing album is not grabbed again and again. With RSS sync on, Lidarr grabs missing albums from the feed automatically; turn RSS off on the indexer if you only want explicit searches.

Upgrading from the JSON state of old versions
docker exec -it lidarr-downloader python3 tools/migrate_json_to_db.py --config-dir /config

The originals are renamed to *.json.migrated.


✦ FAQ

Does it replace a real indexer?
No — it is a fallback for albums your indexers can't find. Audio quality is limited to what YouTube serves.
Does it work with Plex, Jellyfin or Navidrome?
Yes. Files are imported into Lidarr's library, where any music server picks them up.
Which audio formats are supported?
MP3 (up to 320 kbps), M4A and Opus, selectable in Settings. M4A keeps YouTube's native stream without re-encoding.
Can I download a playlist or a single video?
Yes. Paste any YouTube or YouTube Music link on the YouTube page, or open a playlist in Explore and pick the tracks.
What about artists that aren't on MusicBrainz?
Lidarr can't track them, so Explore offers Add from YouTube: one click creates the artist folder with one folder per release, tagged and with covers. Running it again later only fetches new releases.
Is yt-dlp kept up to date?
It is checked at startup, and Settings upgrades it with one click.

✦ Development

git clone https://github.com/Angrido/Lidarr-YouTube-Downloader.git
cd Lidarr-YouTube-Downloader
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
python app.py                            # http://localhost:5000
python -m pytest tests/                  # test suite
python tools/explore_preview.py --demo   # UI with demo data, no Lidarr or downloads

The screenshots come from that demo — artists, albums and covers are generated, not real. With the demo running, npx -y -p playwright node tools/readme_screenshots.js captures them again in both themes.


✦ Disclaimer

For personal use with your own music library. You are responsible for complying with copyright law and YouTube's Terms of Service. Explore reads public YouTube Music pages through the unofficial ytmusicapi library and is not affiliated with or endorsed by YouTube or Google; what it shows depends on what YouTube serves to your server and can change without notice.




Made with care for the self-hosted music community · MIT licensed

Explore related projects

Loading…