mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
feat: adding aria2
This commit is contained in:
parent
a89e6760da
commit
4941709296
58 changed files with 895 additions and 1329 deletions
|
@ -5,7 +5,7 @@ import { contextBridge, ipcRenderer } from "electron";
|
|||
import type {
|
||||
CatalogueCategory,
|
||||
GameShop,
|
||||
TorrentProgress,
|
||||
DownloadProgress,
|
||||
UserPreferences,
|
||||
} from "@types";
|
||||
|
||||
|
@ -32,10 +32,10 @@ contextBridge.exposeInMainWorld("electron", {
|
|||
ipcRenderer.invoke("pauseGameDownload", gameId),
|
||||
resumeGameDownload: (gameId: number) =>
|
||||
ipcRenderer.invoke("resumeGameDownload", gameId),
|
||||
onDownloadProgress: (cb: (value: TorrentProgress) => void) => {
|
||||
onDownloadProgress: (cb: (value: DownloadProgress) => void) => {
|
||||
const listener = (
|
||||
_event: Electron.IpcRendererEvent,
|
||||
value: TorrentProgress
|
||||
value: DownloadProgress
|
||||
) => cb(value);
|
||||
ipcRenderer.on("on-download-progress", listener);
|
||||
return () => ipcRenderer.removeListener("on-download-progress", listener);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue