Skip to main content

lidarr-youtube-downloader

Look for missing tracks in your Lidarr library and download them from YouTube.

Docker Usage

docker run

The docker build needs the .git directory, so be sure to clone the repository.

git clone https://github.com/dmzoneill/lidarr-youtube-downloader.git
docker build -t lyd .
# you need to be careful that the path matches the path that lidarr knows
docker run \
   -v /path/to/music:/path/to/music \
   -v /path/to/db/file:/path/to/db/file \
   -e LIDARR_URL="http://HOST_IP:8686" \
   -e LIDARR_API_KEY="your-api-key" \
   -e LIDARR_DB="/path/to/lidarr/lidarr.db" \
   -e LIDARR_MUSIC_PATH="/music" \
   --name lyd lyd

Local Usage

Requirements

dnf/apt install ffmpeg
pip3 install eyed3 youtube-search-python yt-dlp typer

Install

pip3 install lidarr-youtube-downloader

Config

export LIDARR_URL="http://127.0.0.4:8686"
export LIDARR_API_KEY="your-api-key"
export LIDARR_DB="/path/to/lidarr/lidarr.db"
export LIDARR_MUSIC_PATH="/music"

# Optional settings
export YT_COOKIES_FILE="/path/to/cookies.txt"    # YouTube cookies for auth
export MATCH_THRESHOLD="0.8"                      # Fuzzy match threshold (0.0-1.0)
export BLACKLIST_KEYWORDS="live,karaoke,cover"    # Skip YouTube results with these words

Usage

lyd

Sample output

Album: 34/545   Track: 71/226
================================================================================

    Path           : /music/The Beatles
    Artist         : The Beatles
    Album          : The Beatles
    Track          : Norwegian Wood (This Bird Has Flown)
    Genre          : Acoustic Rock
    Date           : 1988
    CD Count       : 16
    CD No          : 6
    Track No       : 2/12

    YouTube search
    ========================================

        Best title: The Beatles - Norwegian Wood (This Bird Has Flown)
        Best match: 1.0

        Selected https://www.youtube.com/watch?v=W15_1kE08Gc

    yt-dlp
    ========================================

        yt-dlp
            --no-progress
            -x
            --audio-format mp3 "https://www.youtube.com/watch?v=W15_1kE08Gc"
            -o
            "/music/The Beatles/The Beatles/The Beatles - The Beatles - Norwegian Wood (This Bird Has Flown).mp3"


        Downloaded successfully

        [youtube] W15_1kE08Gc: Downloading webpage
        [youtube] W15_1kE08Gc: Downloading MPD manifest
        [download] Destination: /music/The Beatles/The Beatles/The Beatles - The Beatles - Norwegian Wood (This Bird Has Flown).mp3
        [download] Download completed
        [ffmpeg] Correcting container in "/music/The Beatles/The Beatles/The Beatles - The Beatles - Norwegian Wood (This Bird Has Flown).mp3"
        [ffmpeg] Post-process file /music/The Beatles/The Beatles/The Beatles - The Beatles - Norwegian Wood (This Bird Has Flown).mp3 exists, skipping

    Ffmpeg
    ========================================

        ffmpeg -i "/music/The Beatles/The Beatles/The Beatles - The Beatles - Norwegian Wood (This Bird Has Flown).mp3"
            -metadata artist="The Beatles"
            -metadata year="1988"
            -metadata title="Norwegian Wood (This Bird Has Flown)"
            -metadata album="The Beatles"
            -metadata track="2"
            -metadata genre="Acoustic Rock"
            -hide_banner
            -loglevel error
            "/music/The Beatles/The Beatles/The Beatles - The Beatles - Norwegian Wood (This Bird Has Flown).mp3"

        ffmpeg added mp3 tag

Release files for lidarr-youtube-downloader 0.3.35

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lidarr-youtube-downloader 0.3.35
File Size Uploaded
lidarr_youtube_downloader-0.3.35.tar.gz 12.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lidarr-youtube-downloader 0.3.35
File Interpreter ABI Platform
lidarr_youtube_downloader-0.3.35-py3-none-any.whl Python 3 none any Details

Total release size: 27.7 kB

Release files / lidarr_youtube_downloader-0.3.35.tar.gz

Download URL lidarr_youtube_downloader-0.3.35.tar.gz
Size 12.3 kB
Tags Source
SHA-256 checksum
How to use checksums
6bce743a49f0b4dd2fb48ddd2b69e8c44ae5bccda4c08c59f07ccdcf955ba5c2
BLAKE2b-256 checksum
How to use checksums
20b681b8a5c6fd5c05438ccdcd04c5af925dde80144e151c15d37aa545b5d319
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / lidarr_youtube_downloader-0.3.35-py3-none-any.whl

Download URL lidarr_youtube_downloader-0.3.35-py3-none-any.whl
Size 15.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8104ff9b66661a927a748b5d9f0750e45a0e37acf0deede7eb9ffaa91e9071e4
BLAKE2b-256 checksum
How to use checksums
f9b8782ae9a984b9e89a7d9ed1967bcd30f4e2cca8617c2286e73685a62cafbf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.3.35 This release

2 release files

0.3.33

2 release files

0.3.32

2 release files

0.3.31

2 release files

0.3.30

2 release files

0.3.27

2 release files

0.3.26

2 release files

0.3.25

2 release files

0.3.24

2 release files

0.3.23

2 release files

0.3.22

2 release files

0.3.21

2 release files

0.3.20

2 release files

0.3.19

2 release files

0.3.18

2 release files

0.3.17

2 release files

0.3.16

2 release files

0.3.15

2 release files

0.3.14

2 release files

0.3.13

2 release files

0.3.11

2 release files

0.3.10

2 release files

0.3.9

2 release files

0.3.8

2 release files

0.3.7

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.4

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page