chore: improving download queue

This commit is contained in:
Chubby Granny Chaser
2025-01-22 01:39:22 +00:00
parent f387560836
commit 549481f85a
9 changed files with 25 additions and 12 deletions

View File

@@ -19,6 +19,7 @@ const pauseGameDownload = async (
await downloadsSublevel.put(gameKey, {
...download,
status: "paused",
queued: false,
});
}
};

View File

@@ -31,6 +31,7 @@ const resumeGameDownload = async (
...download,
status: "active",
timestamp: Date.now(),
queued: true,
});
}
};

View File

@@ -72,6 +72,7 @@ const startGameDownload = async (
fileSize: null,
shouldSeed: false,
timestamp: Date.now(),
queued: true,
};
await downloadsSublevel.put(gameKey, download);