Skip to content

Conversation

@samhaswon
Copy link

Since tidal-dl is still broken and tidal-dl-ng works, port the audio downloading script to it.

Fixes #391, #374, #289, and maybe more.

Changes

  • Mostly just find/replace tidal-dl calls for tidal-dl-ng.
  • Moved TIDAL config/auth state under /config/extended/tidal_dl_ng via XDG_CONFIG_HOME and ensured directories exist.
  • Mapped audio/video quality settings to tidal-dl-ng enums and set download_base_path/quality_audio through tidal-dl-ng cfg.
  • Updated the bundled TIDAL config to tidal-dl-ng format and switched setup to install tidal-dl-ng.

Breaks

The port does require some changes to work.

  • The Audio and TidalVideoDownloader services must be updated, of course.
    • This could be fixed by checking file hashes in the setup script.
  • The tidal-dl.json file contents are changed. This could be worked around with a rename if desired. If so, the URL in the setup script will break.

Testing

I haven't tested every possible configuration, but it seems to work with lossless/master for the quality. I've tested artists with a mix of lossless and "Max" with no issues. I also started it on my server, and it is having some upstream issues with existing files.

When testing, I mostly just followed the existing setup directions and then copied over the new Audio and video services (including renaming) and the new tidal config file.

Additionally, I don't personally use the video downloading scripts, but it seems to be working.

Potential Issues

For context, since Lidarr started having issues from the MusicBrainz change, I've mostly been doing things manually. Then tidal-dl broke, and I tried fixing it, then gave up after realizing I was basically rewriting the thing. So, I moved to using tidal-dl-ng.

However, since I started using it, there has apparently been some kind of take-down on the original repo. The PyPi package is still up and working, for now, but the GitHub repo is gone.

For reference, here's the PyPi package: https://pypi.org/project/tidal-dl-ng/
But the GitHub repo is a 404: https://github.com/exislow/tidal-dl-ng

If that's an issue, several forks exist that could be used. I haven't found one on PyPi yet, but they could just be installed from GitHub directly like this:

uv pip install --system --upgrade --no-cache-dir --break-system-packages "git+https://github.com/FunWarry/tidal-dl-ng-For-DJ.git@main"

@tinstep
Copy link

tinstep commented Jan 29, 2026

I get very close, but I have FFMPEG issues with these changes - looks like there is a fix here?mkudrjasevs@ea95270

lidarr  | Traceback (most recent call last):
lidarr  |   File "/usr/bin/tidal-dl-ng", line 4, in <module>
lidarr  |     from tidal_dl_ng.cli import app
lidarr  |   File "/usr/lib/python3.12/site-packages/tidal_dl_ng/cli.py", line 25, in <module>
lidarr  |     from tidal_dl_ng.download import Download
lidarr  |   File "/usr/lib/python3.12/site-packages/tidal_dl_ng/download.py", line 24, in <module>
lidarr  |     from ffmpeg import FFmpeg
lidarr  | ImportError: cannot import name 'FFmpeg' from 'ffmpeg' (/usr/lib/python3.12/site-packages/ffmpeg/__init__.py). Did you mean: '_ffmpeg'?
lidarr  | Traceback (most recent call last):
lidarr  |   File "/usr/bin/tidal-dl-ng", line 4, in <module>
lidarr  |     from tidal_dl_ng.cli import app
lidarr  |   File "/usr/lib/python3.12/site-packages/tidal_dl_ng/cli.py", line 25, in <module>
lidarr  |     from tidal_dl_ng.download import Download
lidarr  |   File "/usr/lib/python3.12/site-packages/tidal_dl_ng/download.py", line 24, in <module>
lidarr  |     from ffmpeg import FFmpeg
lidarr  | ImportError: cannot import name 'FFmpeg' from 'ffmpeg' (/usr/lib/python3.12/site-packages/ffmpeg/__init__.py). Did you mean: '_ffmpeg'?
lidarr  | Traceback (most recent call last):
lidarr  |   File "/usr/bin/tidal-dl-ng", line 4, in <module>
lidarr  |     from tidal_dl_ng.cli import app
lidarr  |   File "/usr/lib/python3.12/site-packages/tidal_dl_ng/cli.py", line 25, in <module>
lidarr  |     from tidal_dl_ng.download import Download
lidarr  |   File "/usr/lib/python3.12/site-packages/tidal_dl_ng/download.py", line 24, in <module>
lidarr  |     from ffmpeg import FFmpeg
lidarr  | ImportError: cannot import name 'FFmpeg' from 'ffmpeg' (/usr/lib/python3.12/site-packages/ffmpeg/__init__.py). Did you mean: '_ffmpeg'?

@samhaswon
Copy link
Author

It might be a simpler fix to just postpone the installation of tidal-dl-ng. That, or you've encountered some other odd error. I'll have to check that one out tomorrow.

I've also had a test running in an existing environment with quite the backlog, which has surfaced another potentially upstream issue. For some reason, it'll be deauthed every few hours. I think that's either a tidal-dl-ng issue or Tidal not liking it downloading so much in a relatively short time period.

@tinstep
Copy link

tinstep commented Jan 29, 2026

I manually went through your github and found all the new files and wget-ed then into my install. Probably needs another test from someone more experienced than I to confirm.

@samhaswon
Copy link
Author

So it worked for you? It might have just needed something updated to a newer version, and that happened to fix it.

@samhaswon
Copy link
Author

samhaswon commented Jan 30, 2026

Well, new issue. tidal-dl-ng got taken down on PyPi as well. My Lidarr container updated again, and broke when it couldn't pull it. Looks like this might need to be converted to use one of the forks of tidal-dl-ng.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] - Lidarr - Tidal downloads broken

2 participants