fall back to password auth when the server rejects the token scheme

Navidrome refuses the Subsonic token scheme for LDAP users with error code 41. Catch it
once in SubsonicClient: flip that client to the password scheme, tell SourceRepository to
persist the change for the source and show a toast, then retry the request. Only 41 is
retried, the flip is idempotent, and a client never retries more than once.
This commit is contained in:
austinried
2026-10-04 00:29:59 +00:00
parent 90171468cc
commit 59706f28c1
5 changed files with 124 additions and 11 deletions
@@ -38,6 +38,9 @@ interface SourcesDao {
@Upsert
suspend fun upsertSubsonicSource(subsonic: SubsonicSource)
@Query("UPDATE subsonic_sources SET useTokenAuth = 0 WHERE sourceId = :sourceId")
suspend fun disableTokenAuth(sourceId: Long)
@Query("DELETE FROM sources WHERE id = :id")
suspend fun deleteSourceRow(id: Long)