mirror of
https://github.com/kilyabin/psysonic.git
synced 2026-07-22 06:25:41 +00:00
b8ddb09b78
Three action-factories peel ~25 setters out of the authStore body, following the playerStore action-factory pattern from Phase E: - `createServerProfileActions` — `addServer`, `updateServer`, `removeServer` (the non-trivial one — drops every per-server map entry for the removed id), `setServers`, `setActiveServer`, `setLoggedIn`, `setConnecting`, `setConnectionError`, `logout`. - `createAuthLastfmActions` — credentials + session connect/disconnect + error flag + master scrobbling toggle. Network calls (love / scrobble) stay in the playerStore-side `lastfmActions.ts`. - `createAudioSettingsActions` — replay-gain / normalization / loudness mode toggles (each calls `usePlayerStore.getState() .updateReplayGainForCurrentTrack()` so a running track catches up), plus crossfade / gapless / hi-res / audio-output (no engine callback needed). Pure code-move; no behaviour change. authStore.ts: 518 → 428 LOC (−90).