diff --git a/src/js/Search.jsx b/src/js/Search.jsx index d7f6aca..0556c95 100644 --- a/src/js/Search.jsx +++ b/src/js/Search.jsx @@ -66,8 +66,17 @@ class Search extends React.Component { this.setState({ items: clonedItems, }); - - Steam.addAsset(location.state.assetType, game.appid, item.url).then(() => { + + const downloadPromises = []; + + downloadPromises.push(Steam.addAsset(location.state.assetType, game.appid, item.url)); + + // Add horizontalGrid BPM image for Non-Steam Games + if (game.appidold && location.state.assetType == 'horizontalGrid') { + downloadPromises.push(Steam.addAsset(location.state.assetType, game.appidold, item.url)); + } + + Promise.all(downloadPromises).then(() => { clonedItems[itemIndex].downloading = false; this.setState({ items: clonedItems, diff --git a/src/js/Steam.js b/src/js/Steam.js index c538ccc..c82990e 100644 --- a/src/js/Steam.js +++ b/src/js/Steam.js @@ -146,6 +146,7 @@ class Steam { const appName = item.appname || item.AppName || item.appName; const exe = item.exe || item.Exe; const appid = this.generateNewAppId(exe, appName); + const appidold = this.generateAppId(exe, appName); const configId = metrohash64(exe + item.LaunchOptions); if (store.has(`games.${configId}`)) { @@ -161,6 +162,7 @@ class Steam { platform: storedGame.platform, type: 'shortcut', appid, + appidold, }); processed.push(configId); } @@ -175,6 +177,7 @@ class Steam { platform: 'other', type: 'shortcut', appid, + appidold, }); } });