michaelherger / lms-plugin-tidal

A TIDAL plugin to integrate with the Lyrion Music Server (fka. Logitech Media Server)
43 stars 8 forks source link

"My Mix" not updated when switching Tidal account #41

Closed renebk closed 7 months ago

renebk commented 7 months ago

I have two Tidal accounts set up in the plugin. When switching between the two, the "My Mix" entry is not updated, but remains with previous account. Will eventually update after some hours.

Tested on version 0.8.0

Details: Server

Version: 8.4.1 - 1708787582 @ Sun 25 Feb 2024 04:57:58 AM CET Værtsnavn: raspberrypi Serverens IP-adresse: 10.0.0.35 Styresystem: Debian - DA - utf8 Platformarkitektur: armv7l-linux Perl-version: 5.36.0 - arm-linux-gnueabihf-thread-multi-64int Audio::Scan: 1.08 IO::Socket::SSL: 2.081 Databaseversion: DBD::SQLite 1.58 (sqlite 3.22.0)

michaelherger commented 7 months ago

Can't reproduce this here. What UI are you using?

renebk commented 7 months ago

Hi Michael, Tried out a variation of different UIs: Material Skin (Android, Windows), standard skin, and Squeezer android App as well. Same behaviour. I enabled debug logging on the Tidal plugin, and did following:

  1. On current account get the "My mix" playlists
  2. Change account and do the same.

Here are the log entries, i found, when the list is collected from Tidal: 1) Existing account: [24-03-02 06:47:45.6523] Plugins::TIDAL::API::Async::ANON (408) Using cache key 'tidal_resp:/mixes/daily/track:countryCodeDK:limit2000' [24-03-02 06:47:45.6529] Plugins::TIDAL::API::Async::ANON (419) Returning cached data for /mixes/daily/track?countryCode=DK&limit=100 [24-03-02 06:47:45.6593] Plugins::TIDAL::API::Async::ANON (420) [ { artists => [ ....

2) After account change: [24-03-02 06:49:52.8366] Plugins::TIDAL::API::Async::ANON (408) Using cache key 'tidal_resp:/mixes/daily/track:countryCodeDK:limit2000' [24-03-02 06:49:52.8371] Plugins::TIDAL::API::Async::ANON (419) Returning cached data for /mixes/daily/track?countryCode=DK&limit=100 [24-03-02 06:49:52.8432] Plugins::TIDAL::API::Async::ANON (420) [ { artists => [ ...

All other personal lists do change correctly. E.g. the "Artists" list.

Seems to be related to caching somewhere?

michaelherger commented 7 months ago

Hmm... I wonder why this would work for me, as re-reading the code would tell me you're right!

michaelherger commented 7 months ago

Oh, I see: my two test accounts are in different countries, which is reflected in the cache key. I'll look into this!

michaelherger commented 7 months ago

Thanks for the report!

renebk commented 7 months ago

Much appreciated :) My setup is a Tidal Family, with three individual accounts (and quite a diverse taste of music). The implementation with the possibility of setting a Tidal account per player is excellent. Please let me know if you need additional.