The README had grown to about 500 lines. It now holds the intro, a quick start and an index, and the rest lives in docs/. - docs: add docs/README.md as the index of all pages - docs: move install, configuration, demo, providers, OpenSubsonic, API, security and backups, web app, Android app and development/releases to their own pages, text unchanged - docs: split the feature list into five pages under docs/features/ - docs: rewrite internal anchors as links between the new pages - chore: add docs to .dockerignore, next to README.md
3.8 KiB
Other apps (OpenSubsonic)
Sonda speaks OpenSubsonic (Subsonic API 1.16.1 and its open extensions) at /rest, so the apps that speak it can play your music: Symfonium, Feishin, Amperfy, Supersonic, Tempus, Airsonic Refix and others.
Connect an app.
- Open Settings, Apps and devices, give the app a name and press Make password. The password is shown once: copy it into the app.
- In the app, give the address of your server, your email as the user name, and that password. An app that asks for an API key takes the same password as the key.
The API has the same: POST /me/devices makes a password (and returns it once), GET /me/devices lists them with when each was last used, and DELETE /me/devices/{id} takes one back. You can have 20.
A device password opens your music in that app and nothing else: it cannot sign in to Sonda, change your account or make other passwords, and the password of your account does not work in apps. Make one for each app, and take it back in Settings when you lose the phone: that app stops working at once. The passwords are kept sealed with a key derived from auth.jwt_secret (Subsonic's token login needs the server to know the password itself, so it cannot be kept as a hash), so changing that secret makes you make them again. An app sends the password in the address of each call: give Sonda a server address on https, and do not put these addresses in a log you share.
What an app can do. Calls are answered in JSON (f=json) or XML, and a web app on another address can read the answers (Access-Control-Allow-Origin: *; what opens a call is the password in it, never a cookie).
| Calls | What they do |
|---|---|
ping, getLicense, getOpenSubsonicExtensions, tokenInfo |
The server says who it is. The extensions need no login. |
getMusicFolders, getArtists, getArtist, getAlbum, getSong, getGenres |
Browse your libraries. |
getAlbumList2 |
Random, newest, frequent, recent, by name, by artist, by year, by genre. |
getRandomSongs, getSongsByGenre, search3 |
Find songs, albums and artists. |
stream, download, getCoverArt |
The original file (with Range), and covers of albums, artists and songs. |
getPlaylists, getPlaylist, createPlaylist, updatePlaylist, deletePlaylist |
Your playlists, the same ones as in the web app. After them, when you turned on Show the radio stations in apps, each station of the radio is a playlist (rd-…, Radio · Rock) with other songs every time it is opened; they cannot be changed or deleted. |
scrobble |
A listen is recorded like one made in the web app (and shared on Mastodon if you connected it). A "now playing" message is not recorded. |
star, unstar, getStarred2 |
Your favourites (see Favourites): songs, albums and artists, with the starred date on each, and getAlbumList2 of type starred. |
setRating, getNowPlaying |
Answered with nothing: there are no ratings, and what you play is nobody else's business. |
getUser |
Who the app is logged in as. It is always you, with the roles of an app: play, download, playlists, covers, and never admin. |
getArtistInfo, getArtistInfo2, getAlbumInfo, getAlbumInfo2, getTopSongs, getSimilarSongs, getSimilarSongs2, getLyrics, getLyricsBySongId, getInternetRadioStations, getScanStatus, startScan, getPlayQueue, savePlayQueue, getPlayQueueByIndex, savePlayQueueByIndex |
Answered with nothing (a saved queue is not kept), so that apps that ask them right after the login, like Feishin, work. A call Sonda does not know is an error 0 and shows in the server log. |
Sonda does not transcode: an app always gets the original file, whatever format or bit rate it asks for. The music of friends (federation) is not shown to apps.