mirror of
https://github.com/RandomNinjaAtk/arr-scripts.git
synced 2026-03-02 22:57:35 -05:00
[BUG] - Lidarr - Tidal downloads broken #216
Labels
No labels
Needs Triage
Not Reproducible
Upstream Issue
User Error
bug
documentation
enhancement
good first issue
help wanted
invalid
lidarr
lidarr
question
radarr
readarr
sabnzbd
sonarr
synology (host)
unraid (host)
waiting for logs
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/arr-scripts#216
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @PixNyb on GitHub (Oct 17, 2025).
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:
I've tried re-authenticating manually, and picking different API keys to no avail.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Tidal should be using my authentication to download lossless official albums
Logs/Screenshots
During startup:
Randomly when kicking off the script:
During downloads:
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
@TechSakima commented on GitHub (Oct 31, 2025):
Is there any update for this? I am having the issue as well.
@Tubeman-cell commented on GitHub (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 commented on GitHub (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: https://github.com/RandomNinjaAtk/arr-scripts/issues/289
If anyone knows how to do, maybe help with a pull request?
@SeadogsBooty commented on GitHub (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:
https://github.com/yaronzz/Tidal-Media-Downloader-PRO/issues/327#issuecomment-3425765326
@RandomNinjaAtk commented on GitHub (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 commented on GitHub (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.
@manifoldcuriosity commented on GitHub (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 commented on GitHub (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 commented on GitHub (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 commented on GitHub (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 commented on GitHub (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 commented on GitHub (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 commented on GitHub (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 commented on GitHub (Nov 19, 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.
@theproductionprofessor commented on GitHub (Nov 19, 2025):
I had no luck with authorization. I ran it independently and could not get it authorized with my Tidal account--keeps saying "You have been blocked" both on and off VPN. What user-agent are you using to authorize? I tried TV, and a few others with no luck.
@steve1977 commented on GitHub (Nov 21, 2025):
Do you know how I can download and use the forked tidal-dl file in this script instead? I am happy to troubleshoot and am quite confident that things will work again once the fork is installed. I couldn't find in the code though where tidal-dl is being downloaded / installed inside the docker.
https://github.com/devicelocksmith/Tidal-Media-Downloader
@steve1977 commented on GitHub (Nov 21, 2025):
Mind sharing how you altered the startup script? Curious how to install the fork in the container.
@steve1977 commented on GitHub (Nov 21, 2025):
And here is a link clarifying how to use the fork
https://github.com/yaronzz/Tidal-Media-Downloader/issues/1204
@zGenMedia commented on GitHub (Nov 25, 2025):
Guy really abandoned the software. sigh.
@devicelocksmith commented on GitHub (Nov 25, 2025):
That is how open source software works. You can always take ownership by forking it.
@steve1977 commented on GitHub (Nov 25, 2025):
Agree on the nature of open source and I don't think it is abandoned. And your @devicelocksmith fork of tidal-dl should solve it? Just need to find a way how to integrate it. This script uses tidal-dl, so integrating the forked tidal-dl version should be a quick fix? If I just knew how I can do this...
@devicelocksmith commented on GitHub (Nov 25, 2025):
I am not familiar with the software you are discussing here - I was tagged in this thread. My fork of
tidal-dlworks for PKCE authentication, supports custom PKCE and long term credentials, fixes DASH-XML media download and offers some additional features like remote control that I needed for my own use. Command line should be fully backwards compatible with upstream source of the fork. I am not usingaar-scriptsand not interested in troubleshooting any related integration issues. You are welcome to use my fork as is, port the fixes upstream or fork from it. I made the fork work for my use and that's the extent of my commitment.@steve1977 commented on GitHub (Nov 25, 2025):
Thanks for the fork of tidal-dl and great you got it running again. If you use lidarr, you should give it a try for your own purpose, it's quite great and even supports tidal video downloads.
@PixNyb or @RandomNinjaAtk may know how to integrate the fork, which may also get this script running again?
@devicelocksmith commented on GitHub (Nov 25, 2025):
I don't use
lidarrand my usage oftidal-dlis for a different, very narrow use case.@theproductionprofessor commented on GitHub (Nov 25, 2025):
Not sure if this what you were asking about, but tidal-dl is installed in the root of the docker container, not in the lidarr/extended/ folder. Looking at the files, it should be a matter of simply dropping in the forked tidal-dl.
Just to be clear, how were you able to authorize the forked tidal-dl with your Tidal account? Did you use the PKCE method, the API key method, which agent, etc?
@steve1977 commented on GitHub (Nov 25, 2025):
Thanks. Yes, that was my question. When you say "just drop", how to do that? Which file and where to drop? Is this somewhere in the code that I can adjust? Or how to manually?
I have been toying around with different methods. Let me give it a try again and report back.
@theproductionprofessor commented on GitHub (Nov 25, 2025):
“Just drop” may have been understated. Ha. The script is located in /usr/bin/python3, i had to use:
uv pip —python /usr/bin/python3 uninstall tidal-dl
And then install the newly downloaded fork with:
uv pip install —system —break-system-packages /path/to/downloaded/fork
@steve1977 commented on GitHub (Nov 25, 2025):
Thanks, indeed a bit more than dropping ;-)
How did you compile the forked tidal-dl? Is there a pre-compiled version?
Can I somehow adjust the setup.bash file to automate this? Somehow direct it to the fork?
https://github.com/RandomNinjaAtk/arr-scripts/blob/main/lidarr/setup.bash
@theproductionprofessor commented on GitHub (Nov 28, 2025):
I have successfully installed the fork of tidal-dl by @devicelocksmith into arr-scripts, and we are back in business! My local arr-scripts is now calling the forked tidal-dl and downloading tracks as expected. I currently have the access token set in tidal-dl to the bearer token from my browser session. I expect this will time out within 24 hours, so my next step is to locate a working refresh token (when tidal-dl asked for a refresh token, I skipped it).
@zGenMedia commented on GitHub (Nov 28, 2025):
Bro you wrote all that and did not say how you did it. Nice. Its like Reddit in here.
@theproductionprofessor commented on GitHub (Nov 28, 2025):
lol it’s in the thread above. All I did was update tidal-dl in my Lidarr docker container to the forked version. That was it!
@steve1977 commented on GitHub (Nov 28, 2025):
How did you compile forked tidal-dl? I cannot find a precompiled version?
Do you know whether it is possible to automate this in the setup.bash file, so we don't need to uninstall and install tidal-dl every time we restart the docker?
@theproductionprofessor commented on GitHub (Nov 28, 2025):
I just compiled it in python in the container. I have not looked into automating it in the setup.bash file, although I would think it would be possible. I have restarted my docker container 100 times today and the forked version is still there as I left it. Really you will run into issues when you decide to update the container when @RandomNinjaAtk releases an update.
@steve1977 commented on GitHub (Nov 28, 2025):
Got it, thank you! Do you mind posting a precompiled version or the CLI you used to compile it in python?
I was wondering about the setup.bash to send a pull request to @RandomNinjaAtk
@theproductionprofessor commented on GitHub (Nov 28, 2025):
This is exactly what i used to compile and install tidal-dl while logged into a bash shell within the lidarr container:
unset VIRTUAL_ENVuv pip uninstall tidal-dluv pip install --system --break-system-packages /path/to/downloaded/tidal-dl/forktidal-dl --version@steve1977 commented on GitHub (Nov 28, 2025):
Thank you. But what is the file "fork"? The zipped source code?
@theproductionprofessor commented on GitHub (Nov 28, 2025):
yeah just the zipped files from github. Go to "<> Code" and download the zip (or git clone the url) and extract them inside your lidarr container. And the setup.bash thing seems like a simple job, although I'm not sure how @RandomNinjaAtk would prefer to do it. Here's what i think would work inside setup.bash:
echo "*** install python packages ***" && \uv pip install --system --upgrade --no-cache-dir --break-system-packages \jellyfish \beautifulsoup4 \yt-dlp \beets \yq \pyxDamerauLevenshtein \pyacoustid \requests \colorama \python-telegram-bot \pylast \mutagen \r128gain \#replace tidal-dl with this:git+https://github.com/devicelocksmith/Tidal-Media-Downloader.git \deemix \langdetect \apprise && \@steve1977 commented on GitHub (Nov 29, 2025):
I tried to follow these steps. Seeing below error message when trying to uninstall tidal:
error: No virtual environment found; run
uv venvto create an environment, or pass--systemto install into a non-virtual environment@steve1977 commented on GitHub (Nov 29, 2025):
You also set the "client id"? How did you receive it? Fiddler or somehow in the browser? Any chance post how to do it?
@zGenMedia commented on GitHub (Nov 29, 2025):
He is playing you. Any normal person would share clear information. This is just a person desperately in need of attention.
Do not waste your time.
@PixNyb commented on GitHub (Nov 29, 2025):
Oof I was away for a little bit for work so haven't been able to keep track of this thread, but I'll explain how I got the fork imported.
I've made some changes to the setup.bash script, so instead of my script_init.sh getting the script from the remote every time I just have the contents of the setup.bash script inside of my script_init.sh. This allows me to modify what packages are being installed.
First off, i removed tidal-dl from the pip install under
install python packages. This would be line 55 in the original setup.bash script.I then manually clone the fork repo and install it using pip.
Looks something like this:
Again, this didn't help in solving the issues with tidal as I'm still unable to log in, but I had no time to figure out if another method would be possible. If anyone has time to figure it out I'll be happy to assist in testing
@steve1977 commented on GitHub (Nov 29, 2025):
Thanks. This is super helpful.
The missing piece seems to be to get the client id to get the "client id", which seems required for pkce authorization. Doesn't seem as easy to get. I am trying to figure out and will revert if successful. Please do the same if you figure it. Thanks!
@theproductionprofessor commented on GitHub (Nov 29, 2025):
Not sure how to be more clear than i already am.
@theproductionprofessor commented on GitHub (Nov 29, 2025):
I found the client id for the windows app by opening it within http tools, and intercepting the POST oauth request. That contained client id, access token, and the refresh token, which I put into tidal-dl via menu options 3 and 10. @PixNyb this is only method that has resulted in a successful login for me so far.
Also @zGenMedia would you prefer i didn’t share any of my progress getting this to work? I’m happy to do that if what I’ve shared so far is upsetting to you.
@steve1977 commented on GitHub (Nov 29, 2025):
When you refer to "http tools", are you referring to Fiddler? Can you elaborate where you found the ID and tokens?
@MB-Finski commented on GitHub (Nov 29, 2025):
Hi, a lurker here chiming in: FWIW, the PKCE implementation by devicelocksmith didn't work for me no matter what. If I were you, I'd take a look at python-tidal for reference on how they've implemented PKCE. It just works without fiddling with client IDs or anything like that. Using their examples it's trivial to obtain both an access and a refresh token. (I suspect that then you might not even need the fork by devicelocksmith but could just script python-tidal to get and refresh the tokens for tidal-dl as necessary.)
@theproductionprofessor commented on GitHub (Nov 29, 2025):
You may be right. I am simply manually inputting my access and refresh tokens into the forked tidal-dl, but it very well may work in the original tidal-dl too. I haven’t tried. I fiddled with client id in an effort to get the refresh token grant to match clients between the desktop tidal app and tidal-dl, and it seems to be working well so far!
@steve1977 commented on GitHub (Nov 29, 2025):
I finally got the tokens and the client id. So, I am very close now.
I can now enter the client id and it opens a web-site where i can log in (which also works).
I don't know how to get the "final redirect url". Which is it and how to get it?
@theproductionprofessor commented on GitHub (Nov 29, 2025):
There a windows tool called HTTP Tools that I use to intercept network traffic from programs. Might be similar to Fiddler, I’ve never used that one. I found it by opening HTTP Tools, opening Tidal desktop app from within it, logging into tidal, and looking for the oauth POST request
@theproductionprofessor commented on GitHub (Nov 29, 2025):
I’m unsure about where to find that. I logged in via menu option 10 in tidal-dl with just the access/refresh token from the tidal desktop app
@steve1977 commented on GitHub (Nov 29, 2025):
Are you saying you don't use pkce at all, but just the two tokens? How long does it sustain?
@theproductionprofessor commented on GitHub (Nov 29, 2025):
Usually an hour or two tops. I have been toying with different options to try to extend that with no luck so far. When I try to authorize from a url generated within tidal-dl, I always get blocked by Tidal. I would love to figure how to get that to work properly.
Currently I’m manually updating the tokens every so often, which is a pain. But at least my library is catching up slowly but surely
@steve1977 commented on GitHub (Nov 29, 2025):
My best guess is that the unlock will be to get pkce to work.
What you describe is what I am seeing using the api tokens (with the original tidal-dl).
The advantage of the forked tidal-dl is that it works with pkce, which may not face the same issue. I still need to get the redirect url to work though, which doesn't seem as clear to me how it works.
@MB-Finski commented on GitHub (Nov 30, 2025):
I jerry-rigged python-tidal/tidalapi to handle getting the tokens and refreshing them for me. This has worked flawlessly for the last 12 hours or so. For those willing to tinker: I modified the refreshAccessToken method in tidal.py to execute a refresh routine with tidalapi instead. Seems like the access tokens you get with PKCE have a TTL of 1 hour. No idea how long the TTL is for the refresh tokens.
This is very much a temporary fix to get things going. For a longer term solution, in my humble opinion, replacing tidal-dl with something else might be the sensible thing to do.
@steve1977 commented on GitHub (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 commented on GitHub (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 commented on GitHub (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 commented on GitHub (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 commented on GitHub (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 commented on GitHub (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 commented on GitHub (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 commented on GitHub (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 commented on GitHub (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 commented on GitHub (Dec 4, 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.
@manifoldcuriosity commented on GitHub (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 commented on GitHub (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 commented on GitHub (Dec 31, 2025):
Also, keyindex=1 is master only?
@manifoldcuriosity commented on GitHub (Jan 2, 2026):
I believe so
On Wed, Dec 31, 2025 at 9:10 AM steve1977 @.***> wrote:
@michaelmurney commented on GitHub (Jan 22, 2026):
How did you make it use the devicelocksmith-tidal-dl form on startup?