Skip to content

[BUG] - Lidarr - Tidal downloads broken #391

Open

Description

@PixNyb

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:

  1. Start lidarr with the extended scripts installed
  2. 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

  1. TechSakima commented on Oct 31, 2025

    @TechSakima

    Is there any update for this? I am having the issue as well.

  2. Tubeman-cell commented on Oct 31, 2025

    @Tubeman-cell

    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.

  3. steve1977 commented on Nov 1, 2025

    @steve1977

    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?

  4. SeadogsBooty commented on Nov 3, 2025

    @SeadogsBooty

    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)

  5. RandomNinjaAtk commented on Nov 5, 2025

    @RandomNinjaAtk
    Owner

    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

  6. steve1977 commented on Nov 5, 2025

    @steve1977

    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.

  7. nisstyr commented on Nov 6, 2025

    @nisstyr

    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!

  8. PixNyb commented on Nov 8, 2025

    @PixNyb
    Author

    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

  9. steve1977 commented on Nov 15, 2025

    @steve1977

    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

  10. theproductionprofessor commented on Nov 17, 2025

    @theproductionprofessor

    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

    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 ?

  11. PixNyb commented on Nov 17, 2025

    @PixNyb
    Author

    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

  12. theproductionprofessor commented on Nov 17, 2025

    @theproductionprofessor

    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?

  13. PixNyb commented on Nov 17, 2025

    @PixNyb
    Author

    @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

  14. steve1977 commented on Nov 20, 2025

    @steve1977

    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.

  15. 40 remaining items

  16. steve1977 commented on Nov 30, 2025

    @steve1977

    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.

  17. MB-Finski commented on Nov 30, 2025

    @MB-Finski

    I run lidarr and the arr scripts in an LXC so it's not your typical setup.

    Here's what I did:

    • Installed tidal-dl with support for DASH downloads since the downloads won't work with original tidal-dl anymore
    • Installed tidal-python/tidalapi
    • Used the "pkce example" provided by tidal-python to obtain/refresh the tokens and save them to a file
    • Added a function into the pkce example that overwrites the access token and the TTL of the access token saved by tidal-dl (no need to overwrite the refresh token since refreshing doesn't work with tidal-dl). You can use the TOKEN class provided by tidal-dl to do the loading/saving of the tidal-dl token file.
    • Hijacked the refreshAccessToken to execute the above mentioned script using python's subprocess and then did "self.key = LoginKey()" to reload the access token from disk in tidal-dl.

    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.

  18. steve1977 commented on Nov 30, 2025

    @steve1977

    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.

    • Installed tidal-dl with support for DASH downloads since the downloads won't work with original tidal-dl anymore

    I installed the forked tidal-dl from devicelocksmith. Is that the same?

    • Used the "pkce example" provided by tidal-python to obtain/refresh the tokens and save them to a file

    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?

  19. MB-Finski commented on Dec 1, 2025

    @MB-Finski

    I installed the forked tidal-dl from devicelocksmith. Is that the same?

    Yes, it should work.

    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?

    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).

  20. steve1977 commented on Dec 1, 2025

    @steve1977

    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).

    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?

  21. MB-Finski commented on Dec 1, 2025

    @MB-Finski

    Are you saying that you added the client id/secret into some file? Which one?

    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.

  22. steve1977 commented on Dec 1, 2025

    @steve1977

    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?

  23. steve1977 commented on Dec 3, 2025

    @steve1977

    @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

    @PixNyb @mrlespaulman Have you been succesful with tidal-dl-ng inside this script? It seems this may be the best long-term solution?

  24. PixNyb commented on Dec 3, 2025

    @PixNyb
    Author

    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

  25. steve1977 commented on Dec 5, 2025

    @steve1977

    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.

  26. nisstyr commented on Dec 31, 2025

    @nisstyr

    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

  27. steve1977 commented on Dec 31, 2025

    @steve1977

    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

    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"?

  28. steve1977 commented on Dec 31, 2025

    @steve1977

    Also, keyindex=1 is master only?

  29. nisstyr commented on Jan 2, 2026

    @nisstyr
  30. michaelmurney commented on Jan 22, 2026

    @michaelmurney

    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

    How did you make it use the devicelocksmith-tidal-dl form on startup?

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs TriageNeeds to be validated/confirmed

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions