Use your OSMC Raspberry Pi as a Spotfy Connect receiver! This is cool, it works flawlessly!
Installing this allows you to use Spotify on smartphone or computer connected to the same WiFi/home network while the audio is being played back on your OSMC device. Ideal if your OSMC device is directly attached to your audio receiver. It should work without having to turn the tv on.
This used to be possible via Libspotify and with a user key, but (1) it was linked to your Spotify account and (2) it doesn't work anymore since Libspotify has been depricated by Spotify.
Raspotify seems like a very easy alternative, much easier than the previous solution, not based on libspotify and no need for a key! Every Spotify user connected to your home network can playback music!
It is based on LibreSpot which is not entirely bugfree but is actively being developed.
Installation (Raspberry Pi only!):
Manual: You can install Raspotify manually by following the instructions on github.
Automated: Since the instructions are pretty straightforward, I added them to my AutoSetup.sh automated installer script for easy automated install which also adds Spotify-Connect as a service in MyOSMC. If needed, you can start/stop the service with your TV remote! But I have it always running.
Installation (manually or via Autosetup) works flawlessly! Tested on RPi3 with July update and RPi3 with August update.
The below is copy-pasted from Raspotify's Readme on Github. These are the manual instructions and they are simply copy pasted to AutoSetup.sh. That script will also set quality to highest and allows you to change the device name, then it will add a service to MyOSMC:
# Add repo and its GPG key
curl -sSL https://dtcooper.github.io/raspotify/key.asc | sudo apt-key add -v -
echo 'deb https://dtcooper.github.io/raspotify jessie main' | sudo tee /etc/apt/sources.list.d/raspotify.list
# Install package
sudo apt-get update
sudo apt-get install apt-transport-https
sudo apt-get -y install raspotify
Then you can change the device name to OSMC and set quality to highest via:
sudo nano /etc/default/raspotify
Afterwards, restart the service:
sudo systemctl restart raspotify
If this worked for you, write it here. If you have issues installing, write it here.
If you have trouble using this to cast Spotify from your phone/laptop to your Raspotify device, create an issue on Github:
Or LibreSpot (Raspotify is a wrapper for LibreSpot): https://github.com/plietar/librespot