feat: migrating repacks to a worker

This commit is contained in:
Chubby Granny Chaser 2024-06-03 14:45:12 +01:00
parent 0722868c35
commit 3aa20aa7d9
No known key found for this signature in database
2 changed files with 4 additions and 4 deletions

View File

@ -101,7 +101,7 @@ export function Sidebar() {
}; };
}, [isResizing]); }, [isResizing]);
const getGameTitle = (game: Game) => { const getGameTitle = (game: Omit<Game, "repacks">) => {
if (game.status === "paused") return t("paused", { title: game.title }); if (game.status === "paused") return t("paused", { title: game.title });
if (lastPacket?.game.id === game.id) { if (lastPacket?.game.id === game.id) {

View File

@ -61,7 +61,7 @@ export function Downloads() {
updateLibrary(); updateLibrary();
}); });
const getFinalDownloadSize = (game: Game) => { const getFinalDownloadSize = (game: Omit<Game, "repacks">) => {
const isGameDownloading = lastPacket?.game.id === game.id; const isGameDownloading = lastPacket?.game.id === game.id;
if (game.fileSize) return formatBytes(game.fileSize); if (game.fileSize) return formatBytes(game.fileSize);
@ -72,7 +72,7 @@ export function Downloads() {
return "N/A"; return "N/A";
}; };
const getGameInfo = (game: Game) => { const getGameInfo = (game: Omit<Game, "repacks">) => {
const isGameDownloading = lastPacket?.game.id === game.id; const isGameDownloading = lastPacket?.game.id === game.id;
const finalDownloadSize = getFinalDownloadSize(game); const finalDownloadSize = getFinalDownloadSize(game);
@ -132,7 +132,7 @@ export function Downloads() {
setShowDeleteModal(true); setShowDeleteModal(true);
}; };
const getGameActions = (game: Game) => { const getGameActions = (game: Omit<Game, "repacks">) => {
const isGameDownloading = lastPacket?.game.id === game.id; const isGameDownloading = lastPacket?.game.id === game.id;
const deleting = isGameDeleting(game.id); const deleting = isGameDeleting(game.id);