mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-07 12:53:00 -05:00
[docs] Update README + INSTALL to cover new built-in Spotify integration
This commit is contained in:
55
README.md
55
README.md
@@ -473,44 +473,30 @@ curl "http://localhost:3689/logout?session-id=50"
|
||||
|
||||
## 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
|
||||
version of OwnTone was built with Spotify support.
|
||||
2. 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.
|
||||
3. Make sure you have `libspotify` installed. Unfortunately, it is no longer
|
||||
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`
|
||||
You must also make sure that your browser can reach OwnTone's web interface via
|
||||
the address [http://owntone.local:3689](http://owntone.local:3689). Try it right
|
||||
now! That is where Spotify's OAuth page will redirect your browser with the
|
||||
token that OwnTone needs, so it must work. The address is announced by the
|
||||
server 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.
|
||||
|
||||
Once the above is in order you can login to Spotify via the web interface. The
|
||||
procedure for logging in to Spotify is a two-step procedure due to the current
|
||||
state of libspotify, but the web interface makes both steps available to you.
|
||||
To authorize OwnTone, open the web interface, locate Settings > Online Services
|
||||
and then click the Authorize button. You will then be sent to Spotify's
|
||||
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)
|
||||
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
|
||||
Spotify no longer automatically notifies clients about library updates, so you
|
||||
have to trigger updates manually. You can for instance set up a cron job that
|
||||
runs `/usr/bin/curl http://localhost:3689/api/update`
|
||||
|
||||
OwnTone will not store your password, but will still be able to log you in
|
||||
automatically afterwards, because libspotify saves a login token. You can
|
||||
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`.
|
||||
To 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).
|
||||
|
||||
Limitations:
|
||||
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"
|
||||
```
|
||||
|
||||
### 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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user