mirror of
https://github.com/yuzu-emu/Command-fix.git
synced 2024-11-22 03:15:41 +01:00
Corrected gamedb lookup.
This commit is contained in:
parent
73202911d9
commit
97efa5710b
@ -29,7 +29,14 @@ async function updateDatabase() {
|
||||
throw e;
|
||||
}
|
||||
|
||||
state.gameDB = JSON.parse(body);
|
||||
state.gameDB = JSON.parse(body).map(x => {
|
||||
return {
|
||||
directory: x.directory,
|
||||
title: x.title,
|
||||
compatibility: x.compatibility
|
||||
}
|
||||
});
|
||||
|
||||
state.lastGameDBUpdate = Date.now();
|
||||
logger.info(`Updated games list (${state.gameDB.length} games)`);
|
||||
|
||||
@ -75,8 +82,8 @@ exports.command = async function (message) {
|
||||
return;
|
||||
}
|
||||
|
||||
const screenshot = `${iconBase}${bestGame.id}.png`;
|
||||
const url = `${urlBase}${bestGame.id}/`;
|
||||
const screenshot = `${iconBase}${bestGame.directory}.png`;
|
||||
const url = `${urlBase}${bestGame.directory}/`;
|
||||
|
||||
const compat = compatStrings[bestGame.compatibility];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user