fix: reset downloadingGame and torrentId on cancelDownload

This commit is contained in:
Zamitto 2024-08-05 19:15:36 -03:00
parent fab248de99
commit 19b1d29713
2 changed files with 4 additions and 1 deletions

View File

@ -24,7 +24,7 @@ export class HTTPDownload {
}
static async cancelDownload(gid: string) {
const downloadItem: DownloadItem = this.downloads[gid];
const downloadItem = this.downloads[gid];
downloadItem?.cancel();
delete this.downloads[gid];
}

View File

@ -165,6 +165,9 @@ export class RealDebridDownloader {
await HTTPDownload.cancelDownload(gid);
this.downloads.delete(gameId);
}
this.realDebridTorrentId = null;
this.downloadingGame = null;
}
static async resumeDownload(gameId: number) {