mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-02 02:43:33 +00:00
- 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)
17 lines
409 B
TypeScript
17 lines
409 B
TypeScript
import { IpcRendererEvent, ipcRenderer } from 'electron';
|
|
import { QueueSong } from '/@/renderer/api/types';
|
|
|
|
const fetchLyrics = (song: QueueSong) => {
|
|
ipcRenderer.send('lyric-fetch', song);
|
|
};
|
|
|
|
const getLyrics = (
|
|
cb: (event: IpcRendererEvent, songName: string, source: string, lyric: string) => void,
|
|
) => {
|
|
ipcRenderer.on('lyric-get', cb);
|
|
};
|
|
|
|
export const lyrics = {
|
|
fetchLyrics,
|
|
getLyrics,
|
|
};
|