Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve integration with Mopidy-Iris #61

Open
5 of 10 tasks
tehkillerbee opened this issue May 23, 2022 · 10 comments
Open
5 of 10 tasks

Improve integration with Mopidy-Iris #61

tehkillerbee opened this issue May 23, 2022 · 10 comments

Comments

@tehkillerbee
Copy link
Owner

tehkillerbee commented May 23, 2022

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:

  • Speed up album art display, eg with additional local caching. This is especially visible when running on a RPi3. Sometimes a refresh is needed before the album arts are displayed. Cold startup results in a very long delay before album arts are displayed, likely since they have to be cached first.11/09/2022: Appears to be fixed
  • Better caching in general, as described in Persist caches to disk to avoid slow initialization upon restart #60
  • Album images, artist images, playlist images are downloaded each time the relevant folder is browsed. 11/09/2022: Appears to be fixed/cannot replicate
  • When requesting images from eg. "My Albums", the album images are requested twice - once for each album and once as a list.
  • Handle deleted playlists/albums/artists, without a full refresh. 11/09/2022: Full refresh is not necessary, only reloading the playlist dir.
  • When browsing using the Iris "Playlists"/"Artists" shortcuts, album art is not shown. When browsing using "Tidal/My Playlists", "Tidal/My Artists", album art is displayed. It looks like the album art is never requested.

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

  • When browsing playlists, the number of tracks is always listed as zero. Playlist must be opened to show the actual number of tracks.

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

  • When searching, search result does not have images populated.

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

  • Playlist editing

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

  • Playlist adding

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.

@tehkillerbee tehkillerbee changed the title [Issue] Improve integration with Mopidy-Iris Improve integration with Mopidy-Iris Jun 18, 2022
@blacklight
Copy link
Collaborator

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
Copy link
Owner Author

@blacklight I have tested and updated the issue

@2e0byo
Copy link
Collaborator

2e0byo commented Sep 11, 2022

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
Copy link
Owner Author

tehkillerbee commented Sep 11, 2022

@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
Copy link

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
Copy link
Owner Author

tehkillerbee commented Nov 15, 2022

@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
Copy link

@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
Copy link
Collaborator

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
Copy link

alexandru0-dev commented Nov 16, 2022

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
Copy link
Collaborator

blacklight commented Nov 17, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants