mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-02-09 03:37:45 +03:00
feat: add torbox error handling
This commit is contained in:
parent
9fe1d43145
commit
220b3620d4
@ -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 New Issue
Block a user