tehkillerbee / mopidy-tidal

Tidal Backend plugin for Mopidy
Apache License 2.0
91 stars 27 forks source link

Improve integration with Mopidy-Iris #61

Open tehkillerbee opened 2 years ago

tehkillerbee commented 2 years ago

After testing Mopidy-Tidal together with Iris, it is clear that there are improvements needed as outlined here,

Essentially, the following tasks must be fixed to give a better user experience:

11/09/2022: Does not work with latest master)

11/09/2022: Does not work with latest master

11/09/2022: Does not work with latest master

25/09/22 Added in #76, although not fully implemented/tested. See PR comments for details

01/10/20 Added in #76, although not fully implemented. See #87 for details

Feel free to add more comments in case you have discovered other issues.

blacklight commented 1 year ago

Can we do a quick review of the tasks on this issue? After the PRs merged (or submitted) in the past couple of months, it looks to me like most of these points have been addressed.

tehkillerbee commented 1 year ago

@BlackLight I have tested and updated the issue

2e0byo commented 1 year ago

I don't see any album art when I go to 'playlists', but I do when going to browse/tidal/my playlists, when I have a cold cache (i.e. rm -r ~/.cache/mopidy). @tehkillerbee did you test against a cold cache?

tehkillerbee commented 1 year ago

@2e0byo Yes, you are right. This issue still occurs when browsing Iris - Playlists, Artists shortcut but not when browsing the Tidal - My Playlists, My Albums, My Artists shortcuts. I've updated the issue list accordingly.

alexandru0-dev commented 1 year ago

hello I've just started using Mopidy-Tidal and Iris and I found some issues that I wanted to solve. This said, I want to contribute to this project

tehkillerbee commented 1 year ago

@Alex45463 Good to hear, help is always very appreciated. If you have experienced issues not listed here, please let me know and I'll add them.

PRs are always welcome and of there are specific issues you want to solve, we can probably try to help point you in the right direction.

alexandru0-dev commented 1 year ago

@tehkillerbee i have some issue to loading my liked tracks from tidal and some synchronization issues with Iris+Tidal.

The first issue happens when i just try to see my liked songs. I have 700+ songs and that cause a long fetch for the URIs and seems to locks the thread of mpd until it finished to fetch every song.

Idk if it's mopidy-tidal or tidal-api. An help is grateful to find the issue and to solve it.

Said that, my ideal setup would be a streaming server that allows me to play from tidal and local (ideally extendible with plugins), allowing to control the device where the song is played and switch to one another. (Like Spotify)

blacklight commented 1 year ago

The first issue happens when i just try to see my liked songs. I have 700+ songs and that cause a long fetch for the URIs and seems to locks the thread of mpd until it finished to fetch every song.

I have never tried to access my liked songs directly because I have ~10k of them and I'm pretty sure that that would cause mopidy to freeze for hours.

That being said, mopidy freezing while it runs the lookup isn't something we can do much about, given the mostly single-threaded nature of mopidy. The same goes for the initial lookup: unfortunately mopidy performs lookups with one track at the time, so bulk API calls to speed up things aren't really an option. However, after the first lookup all the tracks should be cached, and successive lookups should be considerably faster. Can you confirm that this is indeed the case?

alexandru0-dev commented 1 year ago

I have never tried to access my liked songs directly because I have ~10k of them and I'm pretty sure that that would cause mopidy to freeze for hours.

That being said, mopidy freezing while it runs the lookup isn't something we can do much about, given the mostly single-threaded nature of mopidy. The same goes for the initial lookup: unfortunately mopidy performs lookups with one track at the time, so bulk API calls to speed up things aren't really an option. However, after the first lookup all the tracks should be cached, and successive lookups should be considerably faster. Can you confirm that this is indeed the case?

Apparently i cannot even lookup for all the songs even if i wait. (I also tried to access my Tracks to browse > Tidal). It could be a timeout from either Iris or Mopidy that is preventing the loading of them. At the moment my internet speed is pretty slow and that could be a factor resulting in these timeouts, but i can play Tidal songs thru my Playlists, my albums or artits.

EDIT: i could load the songs thru the browse > Tidal, but when i click to My Tracks from Iris, i get the notification of timeout and it disconnects me from the mopidy server. The mopidy istance is freezed and doesn't respond neither thru iris neither thru mpc giving timeout.

blacklight commented 1 year ago

You can probably take a look at the mopidy logs when it hangs. As long as you see Lookup URIs lines being printed, it means that the backend is loading the tracks. It's just that it may take a long time, and in the meantime it may be a good idea to avoid refreshes because they could trigger even more lookups.

I have personally never tried to load ~5000 tracks in the main playlist, but loading my largest playlist (a little under 3000 tracks) on a RPi4 takes ~10/15 minutes on the first lookup. After the data is cached, it takes ~30 seconds to load the playlist. If you're on a slow connection and you're loading twice the number of tracks in my largest playlist, then you may easily expect the initial lookup and caching to take ~30 minutes. Subsequent lookups should take much less though.