[docs] Update README + INSTALL to cover new built-in Spotify integration

This commit is contained in:
ejurgensen 2021-05-31 23:25:12 +02:00
parent 6f0fef6179
commit f8e1a193c6
2 changed files with 43 additions and 44 deletions

View File

@ -36,9 +36,10 @@ simultaneous streaming to multiple DAAP clients.
Optional packages: Optional packages:
Feature | Configure argument | Packages Feature | Configure argument | Packages
--------------------|--------------------------|------------------------------------------------ ---------------------|--------------------------|------------------------------------------------
Chromecast | `--enable-chromecast` | libgnutls*-dev libprotobuf-c-dev Chromecast | `--enable-chromecast` | libgnutls*-dev libprotobuf-c-dev
Spotify | `--enable-spotify` | libspotify-dev Spotify (built-in) | `--disable-spotify` | libprotobuf-c-dev
Spotify (libspotify) | `--enable-libspotify` | libspotify-dev
Player web UI | `--disable-webinterface` | libwebsockets-dev Player web UI | `--disable-webinterface` | libwebsockets-dev
Live web UI | `--with-libwebsockets` | libwebsockets-dev Live web UI | `--with-libwebsockets` | libwebsockets-dev
Pulseaudio | `--with-pulseaudio` | libpulse-dev Pulseaudio | `--with-pulseaudio` | libpulse-dev
@ -266,7 +267,7 @@ Libraries:
- libpulse (optional - Pulseaudio local audio) - libpulse (optional - Pulseaudio local audio)
from <https://www.freedesktop.org/wiki/Software/PulseAudio/Download/> from <https://www.freedesktop.org/wiki/Software/PulseAudio/Download/>
- libspotify (optional - Spotify support) - libspotify (optional - Spotify support)
from <https://developer.spotify.com> (deprecated by Spotify)
- libgnutls (optional - Chromecast support) - libgnutls (optional - Chromecast support)
from <http://www.gnutls.org/> from <http://www.gnutls.org/>
- libprotobuf-c (optional - Chromecast support) - libprotobuf-c (optional - Chromecast support)
@ -310,11 +311,16 @@ needed.
To display the configure options `run ./configure --help`. To display the configure options `run ./configure --help`.
Support for Spotify is optional. Use `--enable-spotify` to enable this feature. Support for Spotify is optional. Use `--disable-spotify` to disable this feature.
If you enable this feature `libspotify/api.h` is required at compile time. OwnTone supports two ways of integrating with Spotify: Using its own, built-in
Forked-daapd uses runtime dynamic linking to the libspotify library, so even integration layer (which is the default), or to use Spotify's deprecated
though you compiled with `--enable-spotify`, the executable will still be able libspotify. To enable the latter, you must configure with `--enable-libspotify`
to run on systems without libspotify (the Spotify features will then be disabled). and also make sure libspotify's `libspotify/api.h` is installed at compile time.
At runtime, libspotify must be installed, and `use_libspotify` must be enabled
in owntone.conf. OwnTone uses runtime dynamic linking to the libspotify library,
so even though you compiled with `--enable-libspotify`, the executable will
still be able to run on systems without libspotify. If you only want libspotify
integration, you can use `--disable-spotify` and `--enable-libspotify`.
Support for LastFM scrobbling is optional. Use `--enable-lastfm` to enable this Support for LastFM scrobbling is optional. Use `--enable-lastfm` to enable this
feature. feature.

View File

@ -473,44 +473,30 @@ curl "http://localhost:3689/logout?session-id=50"
## Spotify ## Spotify
### Via libspotify OwnTone has built-in support for playback of the tracks in your Spotify library.
OwnTone has support for playback of the tracks in your Spotify library. You must have a Spotify premium account. If you normally log into Spotify with
your Facebook account you must first go to Spotify's web site where you can get
the Spotify username and password that matches your account.
1. Go to the [web interface](http://owntone.local:3689) and check that your You must also make sure that your browser can reach OwnTone's web interface via
version of OwnTone was built with Spotify support. the address [http://owntone.local:3689](http://owntone.local:3689). Try it right
2. You must have a Spotify premium account. If you normally log into Spotify now! That is where Spotify's OAuth page will redirect your browser with the
with your Facebook account you must first go to Spotify's web site where you token that OwnTone needs, so it must work. The address is announced by the
can get the Spotify username and password that matches your account. server via mDNS, but if that for some reason doesn't work then configure it via
3. Make sure you have `libspotify` installed. Unfortunately, it is no longer router or .hosts file. You can remove it again after completing the login.
available from Spotify, and at the time of writing this they have not
provided an alternative. However, on most Debian-based platforms, you can
still get it like this:
- Add the mopidy repository, see [instructions](https://apt.mopidy.com)
- Install with `apt install libspotify-dev`
Once the above is in order you can login to Spotify via the web interface. The To authorize OwnTone, open the web interface, locate Settings > Online Services
procedure for logging in to Spotify is a two-step procedure due to the current and then click the Authorize button. You will then be sent to Spotify's
state of libspotify, but the web interface makes both steps available to you. authorization service, which will send you back to the web interface after
you have given the authorization.
Note that the address [http://owntone.local:3689](http://owntone.local:3689) Spotify no longer automatically notifies clients about library updates, so you
must be working on your local network to complete the Spotify OAuth web login.
The address is announced automatically via mDNS, but if that for some reason
doesn't work then configure it via router or .hosts file. You can remove it
again after completing the login. This is needed because the redirect_uri
parameter of the Spotify token request is to this address.
Spotify no longer automatically notifies clients about playlist updates, so you
have to trigger updates manually. You can for instance set up a cron job that have to trigger updates manually. You can for instance set up a cron job that
runs `/usr/bin/curl http://localhost:3689/api/update` runs `/usr/bin/curl http://localhost:3689/api/update`
OwnTone will not store your password, but will still be able to log you in To logout and remove Spotify tracks + credentials make a request to
automatically afterwards, because libspotify saves a login token. You can [http://[your_server_address_here]:3689/api/spotify-logout](http://[your_server_address_here]:3689/api/spotify-logout).
configure the location of your Spotify user data in the configuration file.
To permanently logout and remove Spotify tracks + credentials make a request to
[http://[your_server_address_here]:3689/api/spotify-logout](http://[your_server_address_here]:3689/api/spotify-logout)
and also delete the contents of `/var/cache/owntone/libspotify`.
Limitations: Limitations:
You will not be able to do any playlist management through OwnTone - use You will not be able to do any playlist management through OwnTone - use
@ -540,6 +526,13 @@ pipe = "/srv/music/spotify"
metadataPipe = "/srv/music/spotify.metadata" metadataPipe = "/srv/music/spotify.metadata"
``` ```
### Via libspotify
This method is being deprecated, but is still available if the server was built
with it, libspotify is installed and `use_libspotify` is enabled in the config
file. Please consult [previous README versions](#references) for details on
using libspotify.
## LastFM ## LastFM