diff --git a/README.md b/README.md
index c086cb2e..d360dde4 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,6 @@
[

](https://help.hydralauncher.gg)
-
Hydra Launcher
@@ -10,6 +9,7 @@
[](https://github.com/hydralauncher/hydra/actions)
[](https://github.com/hydralauncher/hydra/releases)
+[](https://community.chocolatey.org/packages/hydralauncher)

diff --git a/src/locales/en/translation.json b/src/locales/en/translation.json
index 97f9629a..07029def 100755
--- a/src/locales/en/translation.json
+++ b/src/locales/en/translation.json
@@ -559,6 +559,7 @@
"show_download_speed_in_megabytes": "Show download speed in megabytes per second",
"extract_files_by_default": "Extract files by default after download",
"enable_steam_achievements": "Enable search for Steam achievements",
+ "enable_new_download_options_badges": "Show new download options badges",
"achievement_custom_notification_position": "Achievement custom notification position",
"top-left": "Top left",
"top-center": "Top center",
diff --git a/src/main/main.ts b/src/main/main.ts
index 86bfb458..82ea7c47 100644
--- a/src/main/main.ts
+++ b/src/main/main.ts
@@ -57,8 +57,10 @@ export const loadState = async () => {
const { syncDownloadSourcesFromApi } = await import("./services/user");
void syncDownloadSourcesFromApi();
- // Check for new download options on startup
- DownloadSourcesChecker.checkForChanges();
+ // Check for new download options on startup (if enabled)
+ (async () => {
+ await DownloadSourcesChecker.checkForChanges();
+ })();
WSClient.connect();
});
diff --git a/src/main/services/download-sources-checker.ts b/src/main/services/download-sources-checker.ts
index 928e3d52..169c199e 100644
--- a/src/main/services/download-sources-checker.ts
+++ b/src/main/services/download-sources-checker.ts
@@ -5,10 +5,12 @@ import {
updateDownloadSourcesCheckBaseline,
updateDownloadSourcesSinceValue,
downloadSourcesSublevel,
+ db,
+ levelKeys,
} from "@main/level";
import { logger } from "./logger";
import { WindowManager } from "./window-manager";
-import type { Game } from "@types";
+import type { Game, UserPreferences } from "@types";
interface DownloadSourcesChangeResponse {
shop: string;
@@ -101,6 +103,20 @@ export class DownloadSourcesChecker {
logger.info("DownloadSourcesChecker.checkForChanges() called");
try {
+ const userPreferences = await db.get(
+ levelKeys.userPreferences,
+ {
+ valueEncoding: "json",
+ }
+ );
+
+ if (userPreferences?.enableNewDownloadOptionsBadges === false) {
+ logger.info(
+ "New download options badges are disabled, skipping download sources check"
+ );
+ return;
+ }
+
// Get all installed games (excluding custom games)
const installedGames = await gamesSublevel.values().all();
const nonCustomGames = installedGames.filter(
diff --git a/src/renderer/src/components/sidebar/sidebar-game-item.tsx b/src/renderer/src/components/sidebar/sidebar-game-item.tsx
index 23223fc5..3414688d 100644
--- a/src/renderer/src/components/sidebar/sidebar-game-item.tsx
+++ b/src/renderer/src/components/sidebar/sidebar-game-item.tsx
@@ -5,6 +5,7 @@ import cn from "classnames";
import { useLocation } from "react-router-dom";
import { useState } from "react";
import { GameContextMenu } from "..";
+import { useAppSelector } from "@renderer/hooks";
interface SidebarGameItemProps {
game: LibraryGame;
@@ -18,6 +19,9 @@ export function SidebarGameItem({
getGameTitle,
}: Readonly) {
const location = useLocation();
+ const userPreferences = useAppSelector(
+ (state) => state.userPreferences.value
+ );
const [contextMenu, setContextMenu] = useState<{
visible: boolean;
position: { x: number; y: number };
@@ -81,11 +85,12 @@ export function SidebarGameItem({
{getGameTitle(game)}
- {(game.newDownloadOptionsCount ?? 0) > 0 && (
-
- +{game.newDownloadOptionsCount}
-
- )}
+ {userPreferences?.enableNewDownloadOptionsBadges !== false &&
+ (game.newDownloadOptionsCount ?? 0) > 0 && (
+
+ +{game.newDownloadOptionsCount}
+
+ )}
diff --git a/src/renderer/src/pages/game-details/modals/repacks-modal.tsx b/src/renderer/src/pages/game-details/modals/repacks-modal.tsx
index 08efb014..683ce53a 100644
--- a/src/renderer/src/pages/game-details/modals/repacks-modal.tsx
+++ b/src/renderer/src/pages/game-details/modals/repacks-modal.tsx
@@ -21,7 +21,12 @@ import { DownloadSettingsModal } from "./download-settings-modal";
import { gameDetailsContext } from "@renderer/context";
import { Downloader } from "@shared";
import { orderBy } from "lodash-es";
-import { useDate, useFeature, useAppDispatch } from "@renderer/hooks";
+import {
+ useDate,
+ useFeature,
+ useAppDispatch,
+ useAppSelector,
+} from "@renderer/hooks";
import { clearNewDownloadOptions } from "@renderer/features";
import { levelDBService } from "@renderer/services/leveldb.service";
import { getGameKey } from "@renderer/helpers";
@@ -70,6 +75,9 @@ export function RepacksModal({
const { formatDate } = useDate();
const navigate = useNavigate();
const dispatch = useAppDispatch();
+ const userPreferences = useAppSelector(
+ (state) => state.userPreferences.value
+ );
const getHashFromMagnet = (magnet: string) => {
if (!magnet || typeof magnet !== "string") {
@@ -129,10 +137,12 @@ export function RepacksModal({
}
};
- if (visible) {
+ if (visible && userPreferences?.enableNewDownloadOptionsBadges !== false) {
fetchLastCheckTimestamp();
+ } else {
+ setIsLoadingTimestamp(false);
}
- }, [visible, repacks]);
+ }, [visible, repacks, userPreferences?.enableNewDownloadOptionsBadges]);
useEffect(() => {
if (
@@ -363,11 +373,13 @@ export function RepacksModal({
>
{repack.title}
- {isNewRepack(repack) && (
-
- {t("new_download_option")}
-
- )}
+ {userPreferences?.enableNewDownloadOptionsBadges !==
+ false &&
+ isNewRepack(repack) && (
+
+ {t("new_download_option")}
+
+ )}
{isLastDownloadedOption && (
diff --git a/src/renderer/src/pages/settings/settings-behavior.tsx b/src/renderer/src/pages/settings/settings-behavior.tsx
index c5698ef7..0efbcb64 100644
--- a/src/renderer/src/pages/settings/settings-behavior.tsx
+++ b/src/renderer/src/pages/settings/settings-behavior.tsx
@@ -29,6 +29,7 @@ export function SettingsBehavior() {
enableSteamAchievements: false,
autoplayGameTrailers: true,
hideToTrayOnGameStart: false,
+ enableNewDownloadOptionsBadges: true,
});
const { t } = useTranslation("settings");
@@ -53,6 +54,8 @@ export function SettingsBehavior() {
userPreferences.enableSteamAchievements ?? false,
autoplayGameTrailers: userPreferences.autoplayGameTrailers ?? true,
hideToTrayOnGameStart: userPreferences.hideToTrayOnGameStart ?? false,
+ enableNewDownloadOptionsBadges:
+ userPreferences.enableNewDownloadOptionsBadges ?? true,
});
}
}, [userPreferences]);
@@ -209,6 +212,17 @@ export function SettingsBehavior() {
+
+