fix: fixing seeding on level

This commit is contained in:
Chubby Granny Chaser 2025-02-03 13:50:34 +00:00
parent 7e54a6d0a9
commit e85a568e6e
No known key found for this signature in database
3 changed files with 7 additions and 5 deletions

View file

@ -15,6 +15,7 @@ const pauseGameSeed = async (
await downloadsSublevel.put(downloadKey, {
...download,
status: "complete",
shouldSeed: false,
});

View file

@ -14,6 +14,7 @@ const resumeGameSeed = async (
await downloadsSublevel.put(levelKeys.game(shop, objectId), {
...download,
status: "seeding",
shouldSeed: true,
});

View file

@ -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: <UnlinkIcon />,
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: <LinkIcon />,
show:
download.status !== "seeding" &&
download.downloader === Downloader.Torrent,
game.download?.status !== "seeding" &&
game.download?.downloader === Downloader.Torrent,
onClick: () => {
resumeSeeding(game.shop, game.objectId);
},