Federated tracks are downloaded too late and too slowly and don't play the first time they come up in the queue
Steps to reproduce
- Federate Funkwhale 0.17 with another Funkwhale 0.17 by following a library on the other instance. I used http://open.audio/ as my remote instance, since it has many public libraries.
- Add a track from the remote library to your play queue.
- Play songs until your queue hits the remote track.
(You can also just hit the play button next to a remote track you ahven't played before.)
What happens?
Funkwhale sits and doesn't play the track. If I wait a few minutes and come back and try to play the track again, or if I download the track from my instance with the download button (which can take a couple minutes) before trying to play it, the track plays.
What is expected?
Funkwhale should be able to play me tracks from federated instances with about the same latency as local tracks. Ideally, Funkwhale should be able to stream the data to the client as it is coming in from the remote server. If that can't work, and it takes a minute or two to fetch a remote track that isn't cached, Funkwhale should start this process when it sees the track coming up in my queue, so that when I actually reach it, it can play. When the track finally does come in, Funkwhale should play it for me instead of requiring me to restart the playback of the song to hear it. And if the track can't be fetched in a timely fashion, Funkwhale should maybe skip to the next track in my queue, so my music isn't interrupted.
Context
I'm using Funkwhale 0.17, in Docker. I'm also using it behind a relatively slow Internet connection, so downloading a song file from from the Internet, without any fancy federation handshaking, can take 20-30 seconds, which IMHO is too long to wait for the player to change songs.