mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-23 19:01:02 +00:00
fix: fixing stale downloads not resetting
This commit is contained in:
@@ -8,10 +8,9 @@ const removeGame = async (
|
||||
await gameRepository.update(
|
||||
{
|
||||
id: gameId,
|
||||
status: "removed",
|
||||
},
|
||||
{
|
||||
status: null,
|
||||
status: "removed",
|
||||
downloadPath: null,
|
||||
bytesDownloaded: 0,
|
||||
progress: 0,
|
||||
|
||||
@@ -18,6 +18,7 @@ const startGameDownload = async (
|
||||
gameRepository.findOne({
|
||||
where: {
|
||||
objectID,
|
||||
shop,
|
||||
},
|
||||
relations: { repack: true },
|
||||
}),
|
||||
@@ -28,7 +29,7 @@ const startGameDownload = async (
|
||||
}),
|
||||
]);
|
||||
|
||||
if (!repack || game?.status === "active") return;
|
||||
if (!repack) return;
|
||||
|
||||
await DownloadManager.pauseDownload();
|
||||
|
||||
@@ -44,6 +45,8 @@ const startGameDownload = async (
|
||||
},
|
||||
{
|
||||
status: "active",
|
||||
progress: 0,
|
||||
bytesDownloaded: 0,
|
||||
downloadPath,
|
||||
downloader,
|
||||
repack: { id: repackId },
|
||||
|
||||
Reference in New Issue
Block a user