fix: missing metadata preventing game import

when a metadata provider fails to import a game's developer / publisher, the import is no longer blocked. the imports usally fail because there isn't a page for these compaines
This commit is contained in:
Huskydog9988
2025-05-08 11:57:13 -04:00
parent f9f437dd85
commit 471e85d7c6
5 changed files with 40 additions and 20 deletions
+11 -5
View File
@@ -334,10 +334,16 @@ export class IGDBProvider implements MetadataProvider {
for (const company of findCompanyResponse) {
// if company was a dev or publisher
// CANNOT use else since a company can be both
if (foundInvolved.developer)
developers.push(await developer(company.name));
if (foundInvolved.publisher)
publishers.push(await publisher(company.name));
if (foundInvolved.developer) {
const res = await developer(company.name);
if (res === undefined) continue;
developers.push(res);
}
if (foundInvolved.publisher) {
const res = await publisher(company.name);
if (res === undefined) continue;
publishers.push(res);
}
}
}
}
@@ -403,7 +409,7 @@ export class IGDBProvider implements MetadataProvider {
return metadata;
}
throw new Error("No results found");
throw new Error(`igdb failed to find publisher/developer ${query}`);
}
async fetchDeveloper(
params: _FetchDeveloperMetadataParams,