From 226ea4a39b67343e96947b11ffaaad5ea96d1939 Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Tue, 4 May 2021 10:27:45 -0500 Subject: [PATCH] Torrent IPC API Methods should be public --- api/torrent/src/IpcClient.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api/torrent/src/IpcClient.ts b/api/torrent/src/IpcClient.ts index b755e0e..9dd27ba 100644 --- a/api/torrent/src/IpcClient.ts +++ b/api/torrent/src/IpcClient.ts @@ -14,7 +14,7 @@ export abstract class IpcClient extends I * Add a torrent to the client * @param torrent Magnet URI or file buffer */ - protected async add(torrent: string | Buffer, downloadPath?: string) { + public async add(torrent: string | Buffer, downloadPath?: string) { let response = await this.request("add", { torrent, downloadPath }); if (response.error) { throw new Error("Failed to add torrent"); @@ -26,7 +26,7 @@ export abstract class IpcClient extends I * Remove a torrent from the client * @param torrent Torrent info hash */ - protected async remove(torrent: string) { + public async remove(torrent: string) { let response = await this.request("remove", torrent); if (response.error) { throw new Error("Failed to remove torrent"); @@ -36,7 +36,7 @@ export abstract class IpcClient extends I /** * Get a list of all torrents in the client */ - protected async list() { + public async list() { let response = await this.request("list"); if (response.error) { console.error(response.error); @@ -49,7 +49,7 @@ export abstract class IpcClient extends I * Get full details of each of the provided torrents * @param torrentIds Array of torrent info hashes */ - protected async details(...torrentIds: string[]) { + public async details(...torrentIds: string[]) { let response = await this.request("details", torrentIds); if (response.error) { console.error(response.error);