mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-18 00:33:59 +00:00
feat: limiting nimbus to cloud only
This commit is contained in:
@@ -8,7 +8,7 @@ class HttpDownloader:
|
||||
self.process = None
|
||||
self.last_status = None
|
||||
|
||||
def start_download(self, url: str, save_path: str, header: str = None, out: str = None, allow_multiple_connections: bool = False, connections_limit: int = 1):
|
||||
def start_download(self, url: str, save_path: str, header: str = None, allow_multiple_connections: bool = False, connections_limit: int = 1):
|
||||
cmd = [self.hydra_exe]
|
||||
|
||||
cmd.append(url)
|
||||
|
||||
@@ -36,7 +36,7 @@ if start_download_payload:
|
||||
http_downloader = HttpDownloader(hydra_httpdl_bin)
|
||||
downloads[initial_download['game_id']] = http_downloader
|
||||
try:
|
||||
http_downloader.start_download(initial_download['url'], initial_download['save_path'], initial_download.get('header'), initial_download.get("out"))
|
||||
http_downloader.start_download(initial_download['url'], initial_download['save_path'], initial_download.get('header'), initial_download.get("out"), initial_download.get('allow_multiple_connections', False), initial_download.get('connections_limit', 24))
|
||||
except Exception as e:
|
||||
print("Error starting http download", e)
|
||||
|
||||
|
||||
@@ -499,6 +499,7 @@
|
||||
"animated_profile_banner": "Animated profile banner",
|
||||
"hydra_cloud": "Hydra Cloud",
|
||||
"hydra_cloud_feature_found": "You've just discovered a Hydra Cloud feature!",
|
||||
"learn_more": "Learn More"
|
||||
"learn_more": "Learn More",
|
||||
"debrid_description": "Download up to 4x faster with Nimbus"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -494,6 +494,7 @@
|
||||
"animated_profile_banner": "Banner animado no perfil",
|
||||
"cloud_saving": "Saves de jogos em nuvem",
|
||||
"hydra_cloud_feature_found": "Você descobriu uma funcionalidade Hydra Cloud!",
|
||||
"learn_more": "Saiba mais"
|
||||
"learn_more": "Saiba mais",
|
||||
"debrid_description": "Baixe até 4x mais rápido com Nimbus"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -138,7 +138,6 @@ export function App() {
|
||||
}, [fetchUserDetails, updateUserDetails, dispatch]);
|
||||
|
||||
const syncDownloadSources = useCallback(async () => {
|
||||
console.log("SYNC CALLED");
|
||||
const downloadSources = await window.electron.getDownloadSources();
|
||||
|
||||
const existingDownloadSources: DownloadSource[] =
|
||||
|
||||
@@ -1,15 +1,18 @@
|
||||
import Meteor from "@renderer/assets/meteor.svg?react";
|
||||
import "./debrid-badge.scss";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
export interface DebridBadgeProps {
|
||||
collapsed?: boolean;
|
||||
}
|
||||
|
||||
export function DebridBadge({ collapsed }: Readonly<DebridBadgeProps>) {
|
||||
const { t } = useTranslation("hydra_cloud");
|
||||
|
||||
return (
|
||||
<div className="debrid-badge">
|
||||
<Meteor />
|
||||
{!collapsed && "Baixe até 2x mais rápido com Nimbus"}
|
||||
{!collapsed && t("debrid_description")}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ import { useEffect, useState } from "react";
|
||||
enum Feature {
|
||||
CheckDownloadWritePermission = "CHECK_DOWNLOAD_WRITE_PERMISSION",
|
||||
Torbox = "TORBOX",
|
||||
Nimbus = "NIMBUS",
|
||||
}
|
||||
|
||||
export function useFeature() {
|
||||
|
||||
@@ -185,7 +185,9 @@ export function DownloadSettingsModal({
|
||||
(downloader === Downloader.RealDebrid &&
|
||||
!userPreferences?.realDebridApiToken) ||
|
||||
(downloader === Downloader.TorBox &&
|
||||
!userPreferences?.torBoxApiToken);
|
||||
!userPreferences?.torBoxApiToken) ||
|
||||
(downloader === Downloader.Hydra &&
|
||||
!isFeatureEnabled(Feature.Nimbus));
|
||||
|
||||
return (
|
||||
<Button
|
||||
|
||||
Reference in New Issue
Block a user