Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/main/reactors/url.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,17 @@ export function handleItchioUrl(store: Store, uri: string): boolean {
await queueInstall(store, game, uploadId);
});
return true;
} else if (parsedURL.hostname === "launch") {
doAsync(async () => {
const queryParams = querystring.parse(parsedURL.query);
const caveId = queryParams["cave_id"] as string;
const gameId = parseInt(queryParams["game_id"] as string, 10);
logger.info(`Should launch game because of URL: ${url}`);
//TODO: game wants more but I think the only other property queueGame cares about is title
// and that's only for debug messages
store.dispatch(actions.queueGame({ game: { id: gameId }, caveId }));
});
return true;
}

store.dispatch(actions.navigate({ wind: "root", url }));
Expand Down