mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
Merge branch 'main' into feature/aria2-for-http-downloads
This commit is contained in:
commit
26aad178ee
23 changed files with 142 additions and 153 deletions
|
@ -1,6 +1,6 @@
|
|||
import { Game } from "@main/entity";
|
||||
import { Downloader } from "@shared";
|
||||
import { TorrentDownloader } from "./torrent-downloader";
|
||||
import { PythonInstance } from "./python-instance";
|
||||
import { WindowManager } from "../window-manager";
|
||||
import { downloadQueueRepository, gameRepository } from "@main/repository";
|
||||
import { publishDownloadCompleteNotification } from "../notifications";
|
||||
|
@ -16,7 +16,7 @@ export class DownloadManager {
|
|||
if (this.currentDownloader === Downloader.RealDebrid) {
|
||||
status = await RealDebridDownloader.getStatus();
|
||||
} else {
|
||||
status = await TorrentDownloader.getStatus();
|
||||
status = await PythonInstance.getStatus();
|
||||
}
|
||||
|
||||
if (status) {
|
||||
|
@ -65,7 +65,7 @@ export class DownloadManager {
|
|||
if (this.currentDownloader === Downloader.RealDebrid) {
|
||||
await RealDebridDownloader.pauseDownload();
|
||||
} else {
|
||||
await TorrentDownloader.pauseDownload();
|
||||
await PythonInstance.pauseDownload();
|
||||
}
|
||||
|
||||
WindowManager.mainWindow?.setProgressBar(-1);
|
||||
|
@ -77,7 +77,7 @@ export class DownloadManager {
|
|||
RealDebridDownloader.startDownload(game);
|
||||
this.currentDownloader = Downloader.RealDebrid;
|
||||
} else {
|
||||
TorrentDownloader.startDownload(game);
|
||||
PythonInstance.startDownload(game);
|
||||
this.currentDownloader = Downloader.Torrent;
|
||||
}
|
||||
}
|
||||
|
@ -86,7 +86,7 @@ export class DownloadManager {
|
|||
if (this.currentDownloader === Downloader.RealDebrid) {
|
||||
RealDebridDownloader.cancelDownload(gameId);
|
||||
} else {
|
||||
TorrentDownloader.cancelDownload(gameId);
|
||||
PythonInstance.cancelDownload(gameId);
|
||||
}
|
||||
|
||||
WindowManager.mainWindow?.setProgressBar(-1);
|
||||
|
@ -98,7 +98,7 @@ export class DownloadManager {
|
|||
RealDebridDownloader.startDownload(game);
|
||||
this.currentDownloader = Downloader.RealDebrid;
|
||||
} else {
|
||||
TorrentDownloader.startDownload(game);
|
||||
PythonInstance.startDownload(game);
|
||||
this.currentDownloader = Downloader.Torrent;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue