OpenSubsonic: getUser, so that apps can log in #26

Merged
squid merged 1 commit from fix/opensubsonic-getuser into main 2026-11-16 10:51:05 +00:00
Owner

Closes #25

Feishin failed at the login with "Cannot read properties of undefined (reading 'adminRole')": it asks getUser right after the login and Sonda did not know it.

  • getUser says who the login is, with the roles of an app (play, download, playlists, covers; never admin). Asking about somebody else is error 50.
  • 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. getStarred gives the favourites the older way.
  • A call that is not known is in the server log with its name.
  • Checked: Go tests (opensubsonic with -race, api), and the calls Feishin makes, by hand, on a running server.
Closes #25 Feishin failed at the login with "Cannot read properties of undefined (reading 'adminRole')": it asks `getUser` right after the login and Sonda did not know it. - `getUser` says who the login is, with the roles of an app (play, download, playlists, covers; never admin). Asking about somebody else is error 50. - 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. `getStarred` gives the favourites the older way. - A call that is not known is in the server log with its name. - Checked: Go tests (opensubsonic with -race, api), and the calls Feishin makes, by hand, on a running server.
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.
squid merged commit e37f1165ae into main 2026-11-16 10:51:05 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
squid/sonda!26
No description provided.