mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-01 02:13:33 +00:00
Add lyric search functions and query
This commit is contained in:
parent
43c11ab6e3
commit
0fa5b6496f
7 changed files with 210 additions and 23 deletions
|
|
@ -1,11 +1,16 @@
|
|||
import { IpcRendererEvent, ipcRenderer } from 'electron';
|
||||
import { InternetProviderLyricResponse, QueueSong } from '/@/renderer/api/types';
|
||||
import { InternetProviderLyricResponse, LyricSearchQuery, QueueSong } from '/@/renderer/api/types';
|
||||
|
||||
const fetchRemoteLyrics = (song: QueueSong) => {
|
||||
const result = ipcRenderer.invoke('lyric-fetch-manual', song);
|
||||
return result;
|
||||
};
|
||||
|
||||
const searchRemoteLyrics = (params: LyricSearchQuery) => {
|
||||
const result = ipcRenderer.invoke('lyric-search', params);
|
||||
return result;
|
||||
};
|
||||
|
||||
const remoteLyricsListener = (
|
||||
cb: (
|
||||
event: IpcRendererEvent,
|
||||
|
|
@ -20,4 +25,5 @@ const remoteLyricsListener = (
|
|||
export const lyrics = {
|
||||
fetchRemoteLyrics,
|
||||
remoteLyricsListener,
|
||||
searchRemoteLyrics,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue