mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-28 05:11:02 +00:00
fix: Replace getMagnetData with getMagnetHealth in references and implementations
This commit is contained in:
@@ -27,7 +27,7 @@ import "./torrenting/start-game-download";
|
||||
import "./user-preferences/get-user-preferences";
|
||||
import "./user-preferences/update-user-preferences";
|
||||
import "./user-preferences/auto-launch";
|
||||
import "./repacks/magnet-data"
|
||||
import "./repacks/get-magnet-health"
|
||||
|
||||
ipcMain.handle("ping", () => "pong");
|
||||
ipcMain.handle("getVersion", () => app.getVersion());
|
||||
|
||||
10
src/main/events/repacks/get-magnet-health.ts
Normal file
10
src/main/events/repacks/get-magnet-health.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { webTorrentData } from "@main/services/web-torrent-health"
|
||||
import { registerEvent } from "../register-event"
|
||||
|
||||
const getMagnetHealth = async (_event: Electron.IpcMainInvokeEvent, magnet: string) => {
|
||||
return webTorrentData.getSeedersAndPeers(magnet)
|
||||
}
|
||||
|
||||
registerEvent(getMagnetHealth, {
|
||||
name: 'getMagnetHealth'
|
||||
})
|
||||
@@ -1,10 +0,0 @@
|
||||
import { openWebTorrent } from "@main/services/open-web-torrent"
|
||||
import { registerEvent } from "../register-event"
|
||||
|
||||
const getMagnetData = async (_event: Electron.IpcMainInvokeEvent, magnet: string) => {
|
||||
return openWebTorrent.getSeedersAndPeers(magnet)
|
||||
}
|
||||
|
||||
registerEvent(getMagnetData, {
|
||||
name: 'getMagnetData'
|
||||
})
|
||||
Reference in New Issue
Block a user