mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-02-12 11:12:07 +00:00
feat: add torbox error handling
This commit is contained in:
parent
9fe1d43145
commit
220b3620d4
1 changed files with 7 additions and 3 deletions
|
@ -76,10 +76,10 @@ const startGameDownload = async (
|
|||
queued: true,
|
||||
};
|
||||
|
||||
await downloadsSublevel.put(gameKey, download);
|
||||
|
||||
try {
|
||||
await DownloadManager.startDownload(download);
|
||||
await DownloadManager.startDownload(download).then(() => {
|
||||
return downloadsSublevel.put(gameKey, download);
|
||||
});
|
||||
|
||||
const updatedGame = await gamesSublevel.get(gameKey);
|
||||
|
||||
|
@ -113,6 +113,10 @@ const startGameDownload = async (
|
|||
error: DownloadError.RealDebridAccountNotAuthorized,
|
||||
};
|
||||
}
|
||||
|
||||
if (downloader === Downloader.TorBox) {
|
||||
return { ok: false, error: err.response?.data?.detail };
|
||||
}
|
||||
}
|
||||
|
||||
if (err instanceof Error) {
|
||||
|
|
Loading…
Reference in a new issue