mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
feat: move initial seeding for DownloadManager
This commit is contained in:
parent
843301c8b6
commit
f853a2a39e
4 changed files with 26 additions and 7 deletions
|
@ -9,7 +9,7 @@ import { logger } from "./logger";
|
|||
import { Readable } from "node:stream";
|
||||
import { app, dialog } from "electron";
|
||||
|
||||
interface StartDownloadPayload {
|
||||
interface GamePayload {
|
||||
game_id: number;
|
||||
url: string;
|
||||
save_path: string;
|
||||
|
@ -42,12 +42,13 @@ export class PythonRPC {
|
|||
readable.on("data", logger.log);
|
||||
}
|
||||
|
||||
public static spawn(initialDownload?: StartDownloadPayload) {
|
||||
public static spawn(initialDownload?: GamePayload, initialSeeding?: GamePayload[]) {
|
||||
const commonArgs = [
|
||||
this.BITTORRENT_PORT,
|
||||
this.RPC_PORT,
|
||||
this.RPC_PASSWORD,
|
||||
initialDownload ? JSON.stringify(initialDownload) : "",
|
||||
initialSeeding ? JSON.stringify(initialSeeding) : "",
|
||||
];
|
||||
|
||||
if (app.isPackaged) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue