feat: adding articles for seeding and peers

This commit is contained in:
Chubby Granny Chaser
2025-02-03 20:07:12 +00:00
parent 90cb35db40
commit 52771d5a00
8 changed files with 58 additions and 25 deletions

View File

@@ -13,7 +13,14 @@ const cancelGameDownload = async (
await DownloadManager.cancelDownload(downloadKey);
await downloadsSublevel.del(downloadKey);
const download = await downloadsSublevel.get(downloadKey);
if (!download) return;
await downloadsSublevel.put(downloadKey, {
...download,
status: "removed",
});
};
registerEvent("cancelGameDownload", cancelGameDownload);

View File

@@ -219,8 +219,10 @@ export class DownloadManager {
} as PauseDownloadPayload)
.catch(() => {});
WindowManager.mainWindow?.setProgressBar(-1);
this.downloadingGameId = null;
if (downloadKey === this.downloadingGameId) {
WindowManager.mainWindow?.setProgressBar(-1);
this.downloadingGameId = null;
}
}
static async resumeDownload(download: Download) {