mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-30 14:21:04 +00:00
feat: adding real debrid downloads
This commit is contained in:
@@ -125,9 +125,6 @@ export class RealDebridDownloader {
|
|||||||
const response = await axios.get(downloadUrl, {
|
const response = await axios.get(downloadUrl, {
|
||||||
responseType: "stream",
|
responseType: "stream",
|
||||||
signal: this.abortController.signal,
|
signal: this.abortController.signal,
|
||||||
headers: {
|
|
||||||
Range: `bytes=0-`,
|
|
||||||
},
|
|
||||||
onDownloadProgress: (progressEvent) => {
|
onDownloadProgress: (progressEvent) => {
|
||||||
this.lastProgressEvent = progressEvent;
|
this.lastProgressEvent = progressEvent;
|
||||||
},
|
},
|
||||||
@@ -142,7 +139,7 @@ export class RealDebridDownloader {
|
|||||||
{ folderName: filename }
|
{ folderName: filename }
|
||||||
);
|
);
|
||||||
|
|
||||||
response.data.pipe(fs.createWriteStream(downloadPath, { flags: "a" }));
|
response.data.pipe(fs.createWriteStream(downloadPath));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ export function GameOptionsModal({
|
|||||||
|
|
||||||
const { showSuccessToast, showErrorToast } = useToast();
|
const { showSuccessToast, showErrorToast } = useToast();
|
||||||
|
|
||||||
const { updateGame, setShowRepacksModal, selectGameExecutable } =
|
const { updateGame, setShowRepacksModal, repacks, selectGameExecutable } =
|
||||||
useContext(gameDetailsContext);
|
useContext(gameDetailsContext);
|
||||||
|
|
||||||
const [showDeleteModal, setShowDeleteModal] = useState(false);
|
const [showDeleteModal, setShowDeleteModal] = useState(false);
|
||||||
@@ -156,7 +156,7 @@ export function GameOptionsModal({
|
|||||||
<Button
|
<Button
|
||||||
onClick={() => setShowRepacksModal(true)}
|
onClick={() => setShowRepacksModal(true)}
|
||||||
theme="outline"
|
theme="outline"
|
||||||
disabled={deleting || isGameDownloading}
|
disabled={deleting || isGameDownloading || !repacks.length}
|
||||||
>
|
>
|
||||||
{t("open_download_options")}
|
{t("open_download_options")}
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
Reference in New Issue
Block a user