mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-16 21:50:35 +02:00
Improved lyric syncing, fetch
- uses a somewhat more sane way to parse lyrics and teardown timeouts - adds 'seeked' to setCurrentTime to make detecting seeks in lyric much easier - adds ability to fetch lyrics from genius/netease (desktop only)
This commit is contained in:
@@ -19,6 +19,7 @@ import {
|
||||
PlaybackType,
|
||||
TableType,
|
||||
Platform,
|
||||
LyricSource,
|
||||
} from '/@/renderer/types';
|
||||
|
||||
export type SidebarItemType = {
|
||||
@@ -121,6 +122,11 @@ export interface SettingsState {
|
||||
bindings: Record<BindingActions, { allowGlobal: boolean; hotkey: string; isGlobal: boolean }>;
|
||||
globalMediaHotkeys: boolean;
|
||||
};
|
||||
lyrics: {
|
||||
fetch: boolean;
|
||||
follow: boolean;
|
||||
sources: LyricSource[];
|
||||
};
|
||||
playback: {
|
||||
audioDeviceId?: string | null;
|
||||
crossfadeDuration: number;
|
||||
@@ -202,6 +208,11 @@ const initialState: SettingsState = {
|
||||
},
|
||||
globalMediaHotkeys: true,
|
||||
},
|
||||
lyrics: {
|
||||
fetch: false,
|
||||
follow: true,
|
||||
sources: [],
|
||||
},
|
||||
playback: {
|
||||
audioDeviceId: undefined,
|
||||
crossfadeDuration: 5,
|
||||
@@ -416,3 +427,5 @@ export const useHotkeySettings = () => useSettingsStore((state) => state.hotkeys
|
||||
|
||||
export const useMpvSettings = () =>
|
||||
useSettingsStore((state) => state.playback.mpvProperties, shallow);
|
||||
|
||||
export const useLyricsSettings = () => useSettingsStore((state) => state.lyrics, shallow);
|
||||
|
||||
Reference in New Issue
Block a user