mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-02-15 04:32:13 +00:00
fix: reset downloadingGame and torrentId on cancelDownload
This commit is contained in:
parent
fab248de99
commit
19b1d29713
2 changed files with 4 additions and 1 deletions
|
@ -24,7 +24,7 @@ export class HTTPDownload {
|
||||||
}
|
}
|
||||||
|
|
||||||
static async cancelDownload(gid: string) {
|
static async cancelDownload(gid: string) {
|
||||||
const downloadItem: DownloadItem = this.downloads[gid];
|
const downloadItem = this.downloads[gid];
|
||||||
downloadItem?.cancel();
|
downloadItem?.cancel();
|
||||||
delete this.downloads[gid];
|
delete this.downloads[gid];
|
||||||
}
|
}
|
||||||
|
|
|
@ -165,6 +165,9 @@ export class RealDebridDownloader {
|
||||||
await HTTPDownload.cancelDownload(gid);
|
await HTTPDownload.cancelDownload(gid);
|
||||||
this.downloads.delete(gameId);
|
this.downloads.delete(gameId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.realDebridTorrentId = null;
|
||||||
|
this.downloadingGame = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
static async resumeDownload(gameId: number) {
|
static async resumeDownload(gameId: number) {
|
||||||
|
|
Loading…
Reference in a new issue