mirror of
https://github.com/jeffvli/feishin.git
synced 2026-06-10 06:12:43 +02:00
007a099951
- Make the settings text actually consistent with behavior - Add metadata (artist/track name) for fetched tracks - Add ability to remove incorrectly fetched lyric - Add lyric fetch cache; save the last 10 fetches - Add ability to change offset in full screen, add more comments
23 lines
518 B
TypeScript
23 lines
518 B
TypeScript
import { IpcRendererEvent, ipcRenderer } from 'electron';
|
|
import { InternetProviderLyricResponse, QueueSong } from '/@/renderer/api/types';
|
|
|
|
const fetchRemoteLyrics = (song: QueueSong) => {
|
|
ipcRenderer.send('lyric-fetch', song);
|
|
};
|
|
|
|
const remoteLyricsListener = (
|
|
cb: (
|
|
event: IpcRendererEvent,
|
|
songName: string,
|
|
source: string,
|
|
lyric: InternetProviderLyricResponse,
|
|
) => void,
|
|
) => {
|
|
ipcRenderer.on('lyric-get', cb);
|
|
};
|
|
|
|
export const lyrics = {
|
|
fetchRemoteLyrics,
|
|
remoteLyricsListener,
|
|
};
|