mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-02-15 04:32:13 +00:00
refactor: remove downloadPath constant to get directly from props
This commit is contained in:
parent
fca84f7c90
commit
93ff4b8f7a
1 changed files with 5 additions and 7 deletions
|
@ -37,8 +37,6 @@ const startGameDownload = async (
|
||||||
|
|
||||||
writePipe.write({ action: "pause" });
|
writePipe.write({ action: "pause" });
|
||||||
|
|
||||||
const downloadsPath = downloadPath;
|
|
||||||
|
|
||||||
await gameRepository.update(
|
await gameRepository.update(
|
||||||
{
|
{
|
||||||
status: In([
|
status: In([
|
||||||
|
@ -57,7 +55,7 @@ const startGameDownload = async (
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
status: GameStatus.DownloadingMetadata,
|
status: GameStatus.DownloadingMetadata,
|
||||||
downloadPath: downloadsPath,
|
downloadPath: downloadPath,
|
||||||
repack: { id: repackId },
|
repack: { id: repackId },
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -66,7 +64,7 @@ const startGameDownload = async (
|
||||||
action: "start",
|
action: "start",
|
||||||
game_id: game.id,
|
game_id: game.id,
|
||||||
magnet: repack.magnet,
|
magnet: repack.magnet,
|
||||||
save_path: downloadsPath,
|
save_path: downloadPath,
|
||||||
});
|
});
|
||||||
|
|
||||||
game.status = GameStatus.DownloadingMetadata;
|
game.status = GameStatus.DownloadingMetadata;
|
||||||
|
@ -75,7 +73,7 @@ const startGameDownload = async (
|
||||||
action: "start",
|
action: "start",
|
||||||
game_id: game.id,
|
game_id: game.id,
|
||||||
magnet: repack.magnet,
|
magnet: repack.magnet,
|
||||||
save_path: downloadsPath,
|
save_path: downloadPath,
|
||||||
});
|
});
|
||||||
|
|
||||||
return game;
|
return game;
|
||||||
|
@ -88,7 +86,7 @@ const startGameDownload = async (
|
||||||
objectID,
|
objectID,
|
||||||
shop: gameShop,
|
shop: gameShop,
|
||||||
status: GameStatus.DownloadingMetadata,
|
status: GameStatus.DownloadingMetadata,
|
||||||
downloadPath: downloadsPath,
|
downloadPath: downloadPath,
|
||||||
repack: { id: repackId },
|
repack: { id: repackId },
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -96,7 +94,7 @@ const startGameDownload = async (
|
||||||
action: "start",
|
action: "start",
|
||||||
game_id: createdGame.id,
|
game_id: createdGame.id,
|
||||||
magnet: repack.magnet,
|
magnet: repack.magnet,
|
||||||
save_path: downloadsPath,
|
save_path: downloadPath,
|
||||||
});
|
});
|
||||||
|
|
||||||
const { repack: _, ...rest } = createdGame;
|
const { repack: _, ...rest } = createdGame;
|
||||||
|
|
Loading…
Reference in a new issue