RandomNinjaAtk / docker-lidarr-extended

lidarr-extended :: Lidarr application packaged with multiple scripts to provide additional functionality
GNU General Public License v3.0
275 stars 24 forks source link

[Bug]: Tidal-DL keeps requesting auth when full bandwidth is available #182

Closed Yosh82 closed 1 year ago

Yosh82 commented 1 year ago

Describe the bug Tidal auth keeps requesting auth, within the last 2 hours, I've had to re-auth at least 6 times, it then downloads, but not long after, requires another auth. This has been an ongoing issue for around a month, but I've just kept re-authing. As it continuously happens, I thought I'd raise a bug report.

To Reproduce Steps to reproduce the behaviour:

  1. Auth with tidal via url
  2. Works briefly (varies on time, sometime for 5mins, other times a bit longer) before asking for re-auth

Expected behaviour Keep the auth for the 7 days as the script states the token is valid for this amount of time

Log Data I can provide log file if required

Docker Info:

Additional context This seems to be related to the speed it downloads at. For example, if I set my SABnzbd to 4MB download speed (my max DL speed is only 6MB), and something is downloading, Tidal doesn't seem to drop the auth. Once the full bandwidth is available, this seems to cause the issue. A potential solution from what I've experienced would be to be able to set a download speed limit for the script?

I've tried re-authing via the console, scripts, /scripts/tidal-dl.json - but doesn't resolve it.

Update: Since posting this when this dropped auth around 20mins ago, it has lost auth again. It states 6days 23hours "good" for the access token, but is asking to auth again.

image

Yosh82 commented 1 year ago

A bit more context, I've just re-authd again at 20:18:32 - I'll update again once it asks for auth again.

image

Update: This one lasted until 20:49 - It did download a fair bit from Deezer in between which is why it lasted a bit longer I think. Probably an issue with too much data being downloaded from tidal in x amount of time at a guess, which is why it doesn't seem to happen if limited to 2MB?

image

Thanks in advance for your support

RandomNinjaAtk commented 1 year ago

Basically the script makes a maximum of 6 attempted downloads per client. If the client fails to download anything for all 6 attempts, you get this error and that causes the script to notify you to re-authenticate.

So your issue is likely caused by content just not being available... based on some of the messages in your log file... The only way I could think you could resolve it is to unmonitor those particular albums...

Relevant lines of code: https://github.com/RandomNinjaAtk/docker-lidarr-extended/blob/00421aa29739d0c3469bdbf66c274914efa4263a/root/scripts/Audio.sh#L422-L491

Yosh82 commented 1 year ago

That adds up, a lot of searches do come back as failed / cannot find, as my library is huge and admittedly, now messy due to adding so many related artists. It obviously takes longer to search when the bandwidth is in use, so all makes sense now.

Thanks for looking into this, time to start a bit of house-keeping on Lidarr.