diff --git a/src/main/events/torrenting/pause-game-seed.ts b/src/main/events/torrenting/pause-game-seed.ts index b19da525..fb628ee1 100644 --- a/src/main/events/torrenting/pause-game-seed.ts +++ b/src/main/events/torrenting/pause-game-seed.ts @@ -15,6 +15,7 @@ const pauseGameSeed = async ( await downloadsSublevel.put(downloadKey, { ...download, + status: "complete", shouldSeed: false, }); diff --git a/src/main/events/torrenting/resume-game-seed.ts b/src/main/events/torrenting/resume-game-seed.ts index 63bab952..322e3c5d 100644 --- a/src/main/events/torrenting/resume-game-seed.ts +++ b/src/main/events/torrenting/resume-game-seed.ts @@ -14,6 +14,7 @@ const resumeGameSeed = async ( await downloadsSublevel.put(levelKeys.game(shop, objectId), { ...download, + status: "seeding", shouldSeed: true, }); diff --git a/src/renderer/src/pages/downloads/download-group.tsx b/src/renderer/src/pages/downloads/download-group.tsx index 8c61672c..5bfe2948 100644 --- a/src/renderer/src/pages/downloads/download-group.tsx +++ b/src/renderer/src/pages/downloads/download-group.tsx @@ -173,7 +173,7 @@ export function DownloadGroup({ const deleting = isGameDeleting(game.id); - if (download?.progress === 1) { + if (game.download?.progress === 1) { return [ { label: t("install"), @@ -188,8 +188,8 @@ export function DownloadGroup({ disabled: deleting, icon: , show: - download.status === "seeding" && - download.downloader === Downloader.Torrent, + game.download?.status === "seeding" && + game.download?.downloader === Downloader.Torrent, onClick: () => { pauseSeeding(game.shop, game.objectId); }, @@ -199,8 +199,8 @@ export function DownloadGroup({ disabled: deleting, icon: , show: - download.status !== "seeding" && - download.downloader === Downloader.Torrent, + game.download?.status !== "seeding" && + game.download?.downloader === Downloader.Torrent, onClick: () => { resumeSeeding(game.shop, game.objectId); },