This commit is contained in:
Hachi-R 2024-11-06 19:11:38 -03:00
parent e0f7f34d14
commit d4b1569892

View File

@ -38,12 +38,14 @@ contextBridge.exposeInMainWorld("electron", {
return () => ipcRenderer.removeListener("on-download-progress", listener);
},
onSeedingList: (cb: (value: LibtorrentSeedingPayload[]) => void) => {
const listener = (_event: Electron.IpcRendererEvent, value: LibtorrentSeedingPayload[]) => cb(value);
const listener = (
_event: Electron.IpcRendererEvent,
value: LibtorrentSeedingPayload[]
) => cb(value);
ipcRenderer.on("on-seeding-list", listener);
return () => ipcRenderer.removeListener("on-seeding-list", listener);
},
/* Catalogue */
searchGames: (query: string) => ipcRenderer.invoke("searchGames", query),
getCatalogue: (category: CatalogueCategory) =>