ncspot icon indicating copy to clipboard operation
ncspot copied to clipboard

preview album name in "Similar Tracks"

Open mtshrmn opened this issue 3 years ago • 0 comments

When I open a "similar tracks" list for a particular item, I get a list which doesn't have an album column. furthermore, when I play a song, the newely added items don't have the album column in the queue.

(As seen in the screenshot, note the last/highlighted song) image

This behavior is expected, because the recommendation api returnes a SimplifiedTrack which doesn't have an album property.

Failed Solutions

  • Before serving the "similar tracks" listview, map all items to FullTrack - even with tokio's par_iter() it's still slow enough to see a difference.
  • Serve the listview, but in parallel map all the tracks to FullTrack - on slow connections the update can take time, in that time the user might already leave the listview.
  • Same as the previous solution, but update every entry the moment it turns into a FullTrack - yields the best result, but I was unable to write a performant code

Caveat: with the last two solutions - There's no simple way to force the list to update when the state changes. (In the demo, I just play music to force an update every second, this won't work when no music is played)

Here's a demo for the last solution:

https://user-images.githubusercontent.com/18540571/183246252-db9fb781-7fb3-42cd-9015-ce3d47b8a4c8.mp4

I'd like help with implementing this feature

mtshrmn avatar Aug 06 '22 11:08 mtshrmn