From 64842dc77d952705c1e560e8b88b43867bd5d3bb Mon Sep 17 00:00:00 2001 From: shadowtosser Date: Sat, 20 Apr 2024 23:03:27 -0300 Subject: [PATCH] refactor: remove downloadPath constant to get directly from props --- src/main/events/torrenting/start-game-download.ts | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/main/events/torrenting/start-game-download.ts b/src/main/events/torrenting/start-game-download.ts index d6c243b5..d5143221 100644 --- a/src/main/events/torrenting/start-game-download.ts +++ b/src/main/events/torrenting/start-game-download.ts @@ -37,8 +37,6 @@ const startGameDownload = async ( writePipe.write({ action: "pause" }); - const downloadsPath = downloadPath; - await gameRepository.update( { status: In([ @@ -57,7 +55,7 @@ const startGameDownload = async ( }, { status: GameStatus.DownloadingMetadata, - downloadPath: downloadsPath, + downloadPath: downloadPath, repack: { id: repackId }, } ); @@ -66,7 +64,7 @@ const startGameDownload = async ( action: "start", game_id: game.id, magnet: repack.magnet, - save_path: downloadsPath, + save_path: downloadPath, }); game.status = GameStatus.DownloadingMetadata; @@ -75,7 +73,7 @@ const startGameDownload = async ( action: "start", game_id: game.id, magnet: repack.magnet, - save_path: downloadsPath, + save_path: downloadPath, }); return game; @@ -88,7 +86,7 @@ const startGameDownload = async ( objectID, shop: gameShop, status: GameStatus.DownloadingMetadata, - downloadPath: downloadsPath, + downloadPath: downloadPath, repack: { id: repackId }, }); @@ -96,7 +94,7 @@ const startGameDownload = async ( action: "start", game_id: createdGame.id, magnet: repack.magnet, - save_path: downloadsPath, + save_path: downloadPath, }); const { repack: _, ...rest } = createdGame;