mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-01 02:13:33 +00:00
23 lines
624 B
TypeScript
23 lines
624 B
TypeScript
import { ipcRenderer } from 'electron';
|
|
import { LyricSearchQuery, QueueSong } from '/@/renderer/api/types';
|
|
|
|
const getRemoteLyricsBySong = (song: QueueSong) => {
|
|
const result = ipcRenderer.invoke('lyric-by-song', song);
|
|
return result;
|
|
};
|
|
|
|
const searchRemoteLyrics = (params: LyricSearchQuery) => {
|
|
const result = ipcRenderer.invoke('lyric-search', params);
|
|
return result;
|
|
};
|
|
|
|
const getRemoteLyricsByRemoteId = (id: string) => {
|
|
const result = ipcRenderer.invoke('lyric-by-remote-id', id);
|
|
return result;
|
|
};
|
|
|
|
export const lyrics = {
|
|
getRemoteLyricsByRemoteId,
|
|
getRemoteLyricsBySong,
|
|
searchRemoteLyrics,
|
|
};
|