mirror of
https://github.com/Psychotoxical/psysonic.git
synced 2026-07-22 07:15:47 +00:00
02b2df1589
* feat(lyrics): independent YouLyPlus toggle + all-sources-off state
Replace the binary lyricsMode ('standard' | 'lyricsplus') with an
independent youLyPlusEnabled flag so YouLyPlus and the standard sources
are no longer mutually exclusive — turning one off no longer forces the
other on. YouLyPlus (when on) is tried first with the enabled sources as
fallback; off uses only the enabled sources. When YouLyPlus is off and no
source is enabled, useLyrics fetches nothing (issue #810).
Fresh installs ship with every source off; the rehydrate migration only
restores the old on-by-default set for genuine upgrades, not new installs.
* feat(lyrics): YouLyPlus toggle UI + queue 'no sources' hint
Settings: single YouLyPlus toggle replacing the two mutually exclusive
mode switches; the source list is always visible with a context hint
(fallback vs primary). Queue lyric tab shows a hint when no source is
active. en + de strings; other locales fall back to en.
* docs(changelog): lyrics fully disablable (#855)
29 lines
973 B
TypeScript
29 lines
973 B
TypeScript
import type { AuthState } from './authStoreTypes';
|
|
|
|
type SetState = (
|
|
partial: Partial<AuthState> | ((state: AuthState) => Partial<AuthState>),
|
|
) => void;
|
|
|
|
/**
|
|
* Lyrics fetch-pipeline settings: source order/enablement, mode
|
|
* (standard pipeline vs lyricsplus first), and the static-only
|
|
* rendering toggle. Visual lyrics chrome (rail vs apple,
|
|
* fullscreen show/hide) lives in `authUiAppearanceActions.ts`.
|
|
*/
|
|
export function createLyricsSettingsActions(set: SetState): Pick<
|
|
AuthState,
|
|
| 'setLyricsServerFirst'
|
|
| 'setEnableNeteaselyrics'
|
|
| 'setLyricsSources'
|
|
| 'setYouLyPlusEnabled'
|
|
| 'setLyricsStaticOnly'
|
|
> {
|
|
return {
|
|
setLyricsServerFirst: (v) => set({ lyricsServerFirst: v }),
|
|
setEnableNeteaselyrics: (v) => set({ enableNeteaselyrics: v }),
|
|
setLyricsSources: (sources) => set({ lyricsSources: sources }),
|
|
setYouLyPlusEnabled: (v) => set({ youLyPlusEnabled: v }),
|
|
setLyricsStaticOnly: (v) => set({ lyricsStaticOnly: v }),
|
|
};
|
|
}
|