Issue description:
Yatse spams Jellyfin with authentication requests (around 2/second) which significantly degrades Jellyfin performance for other devices.
Screenshots:
This screenshot shows at the bottom the initial authentication request, and then following a number of the subsequent authentication requests sent by Yatse very frequently
I’m on Jellyfin 10.6.4. My connection is proxied since I can’t portforward currently, but there’s no firewall on that (it just tunnels the traffic directly)
On the Yatse app, it doesn’t show as disconnected/unauthorized and it does sync fine despite this
The issue occurs on the download service, you have some automatic downloads that can’t authenticate. And Yatse will probably fails too when your token expires.
Your Jellyfin seems to sometimes takes more than 15 or event 20 seconds to authenticate I can probably increase the timeout value but this is insanely slow and probably means there’s something wrong on Jellyfin to trigger such delays.
Not sure the multiple auth are the slowness issue, but the slowness on your server triggers the auth issue for sure.
It’s not always so slow (towards the end of the log are authentications that are happening quick enough to not raise a warning).
Either way, opening Yatse on my phone causes the Jellyfin web client to grind to a halt somehow, but I appreciate that if I’m the only person having this then it’s certainly something to do with my setup.
This log is from the instance of opening Yatse, with no other clients active and DLNA turned off (since that was creating log spam too): jellyfin.log (12.1 KB)
Checking the code and logs there’s a side effect / feature / bug (undecided yet) about downloads.
Even if you have something that triggers downloads, the files are already present so the downloads is skipped but even in that case Yatse start a process to seek for external subs / lyrics in case some where added later, causing the auth and issue here. (Still something wrong about timeouts)
I’ll probably remove that only do the search on first download.
Would still be nice to know what you have configured that triggers downloads of files already present this should not really happen.
I have quite a few songs (1k+ right now), and it’s only a subset that it seems to requeue for download so I’m not sure. Also, the storage usage doesn’t increase from it so it’s not storing duplicates of any.
I can try and fetch more logs or run some sort of debug build at some point if you need, but so long as I know that I can just pause the downloads to stop the authentication spam that is good enough for me.
I’ll add some changes to improve the situation about auth and checking again external files on downloads in beta 2.
And yes Yatse does not downloads duplicates but it should not even try to download the files so I’d love to know more what / how you have configured Yatse for those songs downloads. Smart playlist / playlist / artist or genre smart downloads, manual actions. Anything so I can see why and try to fix even if in the end it does not downloads it’s still unnecessary works and network calls.
Will include fix in beta 2, this will reduce a lot the requests on your server when Yatse update the smart sync. This was the probable cause of the server slowness that triggered the auth issue that makes a bad spiral.