mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
fix: fixing stale downloads not resetting
This commit is contained in:
parent
84c746ef35
commit
1171e95b87
8 changed files with 25 additions and 21 deletions
|
|
@ -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 },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue