Skip to content

Commit

Permalink
feat: add torbox icon
Browse files Browse the repository at this point in the history
  • Loading branch information
zamitto committed Feb 1, 2025
1 parent ebc70ce commit bdf3a98
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 18 deletions.
12 changes: 2 additions & 10 deletions src/main/events/cloud-save/upload-save-game.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ const bundleBackup = async (
return tarLocation;
};

export const createBackup = async (
export const uploadSaveGame = async (
_event: Electron.IpcMainInvokeEvent,
objectId: string,
shop: GameShop,
downloadOptionTitle: string | null
Expand Down Expand Up @@ -102,13 +103,4 @@ export const createBackup = async (
});
};

const uploadSaveGame = async (
_event: Electron.IpcMainInvokeEvent,
objectId: string,
shop: GameShop,
downloadOptionTitle: string | null
) => {
return createBackup(objectId, shop, downloadOptionTitle);
};

registerEvent("uploadSaveGame", uploadSaveGame);
5 changes: 0 additions & 5 deletions src/main/services/process-watcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import axios from "axios";
import { exec } from "child_process";
import { ProcessPayload } from "./download/types";
import { gamesSublevel, levelKeys } from "@main/level";
import { createBackup } from "@main/events/cloud-save/upload-save-game";

const commands = {
findWineDir: `lsof -c wine 2>/dev/null | grep '/drive_c/windows$' | head -n 1 | awk '{for(i=9;i<=NF;i++) printf "%s ", $i; print ""}'`,
Expand Down Expand Up @@ -283,10 +282,6 @@ const onCloseGame = (game: Game) => {
gamesPlaytime.delete(levelKeys.game(game.shop, game.objectId));

if (game.remoteId) {
// create backup
// todo: check for hydra cloud?
createBackup(game.objectId, game.shop, "");

updateGamePlaytime(
game,
performance.now() - gamePlaytime.lastSyncTick,
Expand Down
9 changes: 8 additions & 1 deletion src/renderer/src/pages/settings/settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useTranslation } from "react-i18next";
import { SettingsRealDebrid } from "./settings-real-debrid";
import { SettingsGeneral } from "./settings-general";
import { SettingsBehavior } from "./settings-behavior";

import torBoxLogo from "@renderer/assets/icons/torbox.webp";
import { SettingsDownloadSources } from "./settings-download-sources";
import {
SettingsContextConsumer,
Expand Down Expand Up @@ -74,6 +74,13 @@ export default function Settings() {
}
onClick={() => setCurrentCategoryIndex(index)}
>
{index === 3 && (
<img
src={torBoxLogo}
alt="TorBox"
style={{ width: 13 }}
/>
)}
{category}
</Button>
))}
Expand Down
2 changes: 0 additions & 2 deletions src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ export type HydraCloudFeature =
| "backup"
| "achievements-points";

export type DebridServices = "RealDebrid" | "TorBox";

export interface GameRepack {
id: number;
title: string;
Expand Down

0 comments on commit bdf3a98

Please sign in to comment.