Repository navigation
[BUG] - Lidarr - Tidal downloads broken #391
Description
Application
Lidarr
Host platform
Any
Script
tidal-dl
Script Version
2.48 (main)
Describe the bug
It appears that Tidal has finally changed it's API enough for tidal-dl to be unable to function. An update to use tidal-dl-ng might be a solution to this problem, as this seems to function just fine.
When making a download attempt to any album the following occurs:
Starting login process...
[ERR] Login failed.Device authorization failed. Please choose another apikey.
[INFO] Download path:/config/extended/downloads/audio/incomplete
[ERR] No result. [248123865]I've tried re-authenticating manually, and picking different API keys to no avail.
To Reproduce
Steps to reproduce the behavior:
- Start lidarr with the extended scripts installed
- Wait for the Audio script to kick off and download missing/unmet albums
Expected behavior
Tidal should be using my authentication to download lossless official albums
Logs/Screenshots
During startup:
...
x :: Audio :: 2.48 :: TIDAL :: Verifying tidal-dl configuration
x :: Audio :: 2.48 :: TIDAL :: No default config found, importing default config "tidal.json"
/usr/lib/python3.12/site-packages/aigpy/tagHelper.py:211: SyntaxWarning: invalid escape sequence '\c'
self.copyright = self.__getTagItem__('\cprt')
/usr/lib/python3.12/site-packages/tidal_dl/printf.py:47: SyntaxWarning: invalid escape sequence '\_'
def logo():
x :: Audio :: 2.48 :: TIDAL :: Purging album list cache...
...
Randomly when kicking off the script:
x :: Audio :: 2.48 :: TIDAL :: Verifying tidal-dl configuration
x :: Audio :: 2.48 :: TIDAL :: No default config found, importing default config "tidal.json"
x :: Audio :: 2.48 :: TIDAL :: ERROR :: Loading client for required authentication, please authenticate, then exit the client...
/$$$$$$$$ /$$ /$$ /$$ /$$ /$$
|__ $$__/|__/ | $$ | $$ | $$| $$
| $$ /$$ /$$$$$$$ /$$$$$$ | $$ /$$$$$$$| $$
| $$ | $$ /$$__ $$ |____ $$| $$ /$$$$$$ /$$__ $$| $$
| $$ | $$| $$ | $$ /$$$$$$$| $$|______/| $$ | $$| $$
| $$ | $$| $$ | $$ /$$__ $$| $$ | $$ | $$| $$
| $$ | $$| $$$$$$$| $$$$$$$| $$ | $$$$$$$| $$
|__/ |__/ \_______/ \_______/|__/ \_______/|__/
https://github.com/yaronzz/Tidal-Media-Downloader
2022.10.31.1
+-------------------------------+-----------------------------------------------------------+
| SETTINGS | VALUE |
+-------------------------------+-----------------------------------------------------------+
| Settings path | /config/xdg/.tidal-dl.json |
| Download path | /config/extended/downloads/audio/incomplete |
| Album folder format | atd |
| Playlist folder format | Playlist/{PlaylistName} [{PlaylistUUID}] |
| Track file format | {TrackNumber} - {TrackTitle} |
| Video file format | {VideoNumber} - {ArtistName} - {VideoTitle}{ExplicitFlag} |
| Audio quality | AudioQuality.HiFi |
| Video quality | VideoQuality.P1080 |
| Use playlist folder | False |
| Check exist | True |
| Show progress | False |
| Show Track Info | True |
| Save AlbumInfo.txt | False |
| Save covers | True |
| Include singles & EPs | True |
| Language | English |
| Save timed lyrics (.lrc file) | True |
| Multi thread download | False |
| APIKey support | [4]Normal/High/HiFi/Master |
| Use Download Delay | None |
+-------------------------------+-----------------------------------------------------------+
Starting login process...
[ERR] Login failed.Device authorization failed. Please choose another apikey.
====================================================
CHOICE FUNCTION
Enter '0': Exit
Enter '1': Check AccessToken
Enter '2': Logout
Enter '3': Set AccessToken
Enter '4': Settings-Path
Enter '5': Settings-Quality
Enter '6': Settings-Else
Enter '7': Select APIKey
Enter 'Url/ID': Download by url or ID
====================================================
Traceback (most recent call last):
File "/usr/bin/tidal-dl", line 10, in <module>
sys.exit(main())
^^^^^^
File "/usr/lib/python3.12/site-packages/tidal_dl/__init__.py", line 92, in main
choice = Printf.enter(LANG.select.PRINT_ENTER_CHOICE)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/tidal_dl/printf.py", line 135, in enter
ret = input("")
^^^^^^^^^
EOFError: EOF when reading a line
Enter Choice:x :: Audio :: 2.48 :: TIDAL :: Purging album list cache...
During downloads:
x :: Audio :: 2.48 :: 1 :: missing :: 6 of 62 :: Kaleo :: Surface Sounds :: Album :: Download Attempt number 1
Starting login process...
[ERR] Login failed.Device authorization failed. Please choose another apikey.
[INFO] Download path:/config/extended/downloads/audio/incomplete
[ERR] No result. [179016368]
Additional context
Tidal-dl has been end of life for quite a while and tidal-dl-ng has replaced it in many cases. It should be rather easy to update the scripts to use the ng variant rather than the original tidal-dl
Activity
TechSakima commentedon Oct 31, 2025
Is there any update for this? I am having the issue as well.
Tubeman-cell commentedon Oct 31, 2025
Hello,
I’m encountering the same issue with the script version 2.48 (main) where tidal-dl stops working due to the API changes in Tidal.
Could you please advise if a fix or update will be released in the near term?
Thank you for your time and effort.
steve1977 commentedon Nov 1, 2025
This indeed would be great as Tidal is now basically broken for both audio and video.
Someone had looked into this before: #289
If anyone knows how to do, maybe help with a pull request?
SeadogsBooty commentedon Nov 3, 2025
Any chance of getting this updated?? There seems to be a fix to the API and Tidal-dl exe is now working again as referenced here:
yaronzz/Tidal-Media-Downloader-PRO#327 (comment)
RandomNinjaAtk commentedon Nov 5, 2025
FYI: I haven't been actively working on this project because I haven't been actively using it, especially when Lidarr broke many months ago. I do plan to circle back to this but have been mostly waiting for Lidarr to be fully functional again. Which I believe the metadata service is still a work in progress, even though it is working at this time
steve1977 commentedon Nov 5, 2025
Thanks @RandomNinjaAtk , great you are planning to eventually get back to it. This will be great!
I've been following the metadata issue. It is actually fully functioning again by now and quite stable. There remain issues with spotify playlists and also the Apple Music / Itunes playlists as well as artist art not being displayed. But that feels minor to me.
The broken tidal-dl support is quite annoying. And the fix isn't as easy and less in your hands. Not sure what the effort would be to move to tidal-dl-ng, which would solve it. The other solution would be for someone to send a fix or fork tidal-dl. Tidal-dl seems abandoned.
Out of curiosity, what feature will you be using and is the video support with tidal & imvdb among them? Maybe the video support could be added as a plugin to lidarr plugin branch? The plugin branch is quite clean and stable.
nisstyr commentedon Nov 6, 2025
Thank you @RandomNinjaAtk for your plug-ins that I have been using for many years now. I hopped back into this project now that the Lidarr metadata server is back up but was devastated to see that tidal-dl functionality had broken in the meantime. Hopefully the solution is somewhat easy!
PixNyb commentedon Nov 8, 2025
Can confirm that the Lidarr metadata server is up for the most part! Personally my Lidarr instance works as expected again and I have no trouble finding any of my more obscure artists/albums
steve1977 commentedon Nov 15, 2025
Someone has fixed tidal-dl, so we should be game again. Can you use the forked branch with the fix?
https://github.com/devicelocksmith/Tidal-Media-Downloader
theproductionprofessor commentedon Nov 17, 2025
i tried dropping this in as a direct replacement for the deprecated tidal-dl, but i cannot get it to log in successfully. i keep getting blocked on tidals end. Has anyone else been able to log in with the new tidal-dl by @devicelocksmith ?
PixNyb commentedon Nov 17, 2025
I've tried this as well, altered the startup script to use the fork instead but was also unable to log in even doing it manually from within the lidarr container
theproductionprofessor commentedon Nov 17, 2025
I may try rewriting my local files in my container to use tidal-dl-ng instead, but i suspect that will be a major rewrite. has anyone tried logging in with tidal-dl-ng lately?
PixNyb commentedon Nov 17, 2025
@mrlespaulman tidal-dl-ng works just fine for me, but the commands and configuration are a bit different so it would be quite the rewrite I believe
steve1977 commentedon Nov 20, 2025
It seems @devicelocksmith fork will be our best bet and should work without any adjustments a Did anyone succeed to get it running? I don’t even know how to do so. I ran it independent of this script and it works flawlessly.
40 remaining items
steve1977 commentedon Nov 30, 2025
Thanks @MB-Finski. You using lidarr in a docker with arr scripts? If so, would you be willing to write a how-to on what you have accomplished? I have been toying around for this for a while. I always get it working for a bit, but then it stops again. Your way seems to be the best interim solution until tidal-dl is replaced with tidal-dl-ng or else.
MB-Finski commentedon Nov 30, 2025
I run lidarr and the arr scripts in an LXC so it's not your typical setup.
Here's what I did:
That's it. Less than 20 lines of new code, otherwise it's just copy-pasted. You could skip the subprocess part trivially and integrate the separate script into the refreshAccessToken method but I couldn't be bothered since it works like it is.
steve1977 commentedon Nov 30, 2025
Thanks for your help. Not sure I will be able to implement it, but below raises a few ideas to at least get it manually to work for a bit.
I installed the forked tidal-dl from devicelocksmith. Is that the same?
When I select "10" and add the client id/secret, things work for a bit. However, the client id/secret disappear after a while. Not even expire, but just disappear. It seems I have to somehow save them to make this sustainable? Any thoughts how?
MB-Finski commentedon Dec 1, 2025
Yes, it should work.
Hmm, sorry, I'm unsure as to what you mean. I simply write the access token to the tidal-dl token file from where it is picked up by tidal-dl . Client id and secret should be irrelevant as only the access token is used for requests going out to tidal (as long as the access token is valid, of course).
steve1977 commentedon Dec 1, 2025
I need the client id/secret to trigger the tokem and refresh. When I enter "tidal-dl", I can add it when selecting "10". I then get the link to sign in and receive the token. Then everything is working for a bit. However, somehow the client id/secret then disappears from the menu and at the next refresh the token doesn't get renewed. Once I manually add the client id/secret back, it auto renews. Something is weird here. It seems I need to make the client id/token more permanent.
Are you saying that you added the client id/secret into some file? Which one?
MB-Finski commentedon Dec 1, 2025
Ahh, I see where the confusion stems from: I'm not using tidal-dl to refresh the tokens as that doesn't work. I edited the refreshAccessToken() method of tidal-dl (inside tidal.py) to use tidal-python for refreshing the token. Therefore the client id/secret that are set in tidal-dl are never used.
steve1977 commentedon Dec 1, 2025
Got it... I am getting closer to replicate what you accomplished. Mind sharing the code on paste.bin or otherwise? You manually edited the pkce_example.py anf the tidal.py files, right? These 2 files contain the 20 files of new code you refer to?
steve1977 commentedon Dec 3, 2025
@PixNyb @mrlespaulman Have you been succesful with tidal-dl-ng inside this script? It seems this may be the best long-term solution?
PixNyb commentedon Dec 3, 2025
I'm sure it could be done but currently don't have time to rewrite the audio script. Some commands require different setup, and the configuration files i believe are also different
steve1977 commentedon Dec 5, 2025
Thanks @PixNyb for your response. Hope you or someone else can give it a shot to implement tidal-dl-ng at some point. I tried to look into the code, but it seems some more difficult than my very basic code reading will be able to accomplish. Maybe at some point in the future with AI...
And for the time being, I am trying to make @MB-Finski solution work for me. Still need his help though. I believe I succeeded to install tidal-python, but don't even know how to run it from console and far away from integrating it into the code.
nisstyr commentedon Dec 31, 2025
I got this working by changing the api key index to 1 in both config files and using the devicelocksmith tidal-dl fork on startup
steve1977 commentedon Dec 31, 2025
Thanks for sharing. Did you try running the script over a longer time period. I got things working as well with the fork, but only worked for an hour or so.
Also, can you elaboarate what you refer to by "both config files"?
steve1977 commentedon Dec 31, 2025
Also, keyindex=1 is master only?
nisstyr commentedon Jan 2, 2026
michaelmurney commentedon Jan 22, 2026
How did you make it use the devicelocksmith-tidal-dl form on startup?