Skip to content
This repository has been archived by the owner on Jun 6, 2022. It is now read-only.

Commit

Permalink
Fix asset for manually added non-steam games
Browse files Browse the repository at this point in the history
As I said here : #130, SteamGridDB don't update assets for non-steam games added manually (non imported by SteamGridDB).

After researches I found that Steam generate an random individual ID for every non-steam game manually added and it doesn't correspond to the function generateNewAppId used here,

It results that SteamGridDB update images with the wrong ID's

My commit set the value of appid with generateNewAppID only if there's no existing appid so it works with imported and manually added non-steam games.
  • Loading branch information
SantaHey authored and doZennn committed Aug 8, 2021
1 parent 071c795 commit aba68b4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/js/Steam.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,11 @@ class Steam {
items.shortcuts.forEach((item) => {
const appName = item.appname || item.AppName || item.appName;
const exe = item.exe || item.Exe;
const appid = this.generateNewAppId(exe, appName);
const configId = metrohash64(exe + item.LaunchOptions);
const appid = (item.appid) ?
(item.appid >>> 0) : //bitwise unsigned 32 bit ID of manually added non-steam game
this.generateNewAppId(exe, appName);


if (store.has(`games.${configId}`)) {
const storedGame = store.get(`games.${configId}`);
Expand Down

0 comments on commit aba68b4

Please sign in to comment.