Open BonoNL opened 6 years ago
For that I guess you need Web Playback working on Sailfish. If that works then you are probably better off using spotify's webplayer.
Theoretically we could probably try to make Librespot more tightly integrated. Currently we're simply using an example Spotify Connect client IIRC. Not sure if there is any point spending time on this.
Would it be possible to get librespot more robust against connection changes, say by using it through localhost or a socket? As you can already start and stop it with the UI app, that would qualify as a standalone player to me.
Make it not the top prio, let us first polish the goods we have.
I've noticed that when I launch Hutspot, it doesn't respect the setting "Start Librespot when launched and stop it on exit", at least not so that one can start playing. However, if I have the Devices page open on startup and refresh the token, it activates Librespot and I can start playing. So a (bit dirty) workaround would be to refresh the token when Hutspot is opened, that way we're quite close to a standalone player in my opinion (after the initial installation and setting things up).
It really does respect the setting and the token is refreshed at startup. However connecting with the new instance of librespot takes quit some time. Somehow the Spotify servers do not 'see' librespot immediately and the web-api can only use the device once it has been 'seen'. Having the devices page shown at startup is indeed the best way to detect librespot is available for playing.
You're right, the setting is respected. Could a timer be implemented for refreshing the token? It seems that Librespot fails to register/refresh the token upon startup. I waited a couple of minutes but nothing, And I get the following error message in console:
[C] :94 - _performRequest: 401: No token provided
If I manually refresh I get Librespot active on the Device list instantly.
There is already a timer doing just that (reloadDevicesTimer in Devices.qml). Looks like something makes it stop for ever.
Is there a way I could debug that? I can't load Hutspot to the emulator, because there are a lot of QML plugins missing and other warnings. Haven't checked too much how to solve those, though.
I don't use the emulator and always debug on the device (deploy as rpm package).
In future, make Hutspot not only a controller, but also a standalone player on the device it is running at.
That would make the app more useful and complete and eventually makes it a replacement for other not native SailfishOS apps.