mirror of
https://github.com/austinried/subtracks.git
synced 2026-11-16 01:00:17 +01:00
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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user