fix: OpenSubsonic apps can log in: getUser and the calls that follow

Feishin asks getUser right after the login and failed on the missing user. getUser
now says who the login is, with the roles of an app (play, download, playlists,
covers; never admin), and only about the person of the login.

Also answered with nothing, because apps ask them straight away: getArtistInfo(2),
getAlbumInfo(2), getTopSongs, getSimilarSongs(2), getLyrics, getLyricsBySongId,
getInternetRadioStations, getScanStatus, startScan and the play queue calls, and
getStarred, the older way to ask for the favourites.

A call that is not known is now in the server log with its name.
This commit is contained in:
tgiachi 2026-11-16 11:50:44 +01:00
commit d6064763e7

View file

@ -311,6 +311,8 @@ A device password opens your music in that app and nothing else: it cannot sign
| `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.