Skip to content

Commit

Permalink
Fix: reduce candidate missing files log level (#450)
Browse files Browse the repository at this point in the history
  • Loading branch information
emmercm authored Jun 23, 2023
1 parent ebbc896 commit 04242a8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/modules/candidateGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ export default class CandidateGenerator extends Module {
// Ignore the Game if not every File is present
if (missingRoms.length > 0) {
if (foundRomsWithFiles.length > 0) {
await this.logMissingRomFiles(dat, game, release, missingRoms);
await this.logMissingRomFiles(dat, game, release, foundRomsWithFiles, missingRoms);
}
return undefined;
}
Expand Down Expand Up @@ -298,16 +298,17 @@ export default class CandidateGenerator extends Module {
dat: DAT,
game: Game,
release: Release | undefined,
foundRomsWithFiles: ROMWithFiles[],
missingRoms: ROM[],
): Promise<void> {
let message = `${dat.getNameShort()}: missing ${missingRoms.length.toLocaleString()} file${missingRoms.length !== 1 ? 's' : ''} for: ${game.getName()}`;
let message = `${dat.getNameShort()}: ${game.getName()}: found ${foundRomsWithFiles.length.toLocaleString()} file${missingRoms.length !== 1 ? 's' : ''}, missing ${missingRoms.length.toLocaleString()} file${missingRoms.length !== 1 ? 's' : ''}`;
if (release?.getRegion()) {
message += ` (${release?.getRegion()})`;
}
missingRoms.forEach((rom) => {
message += `\n ${rom.getName()}`;
});
await this.progressBar.logWarn(message);
await this.progressBar.logDebug(message);
}

private async hasConflictingOutputFiles(romsWithFiles: ROMWithFiles[]): Promise<boolean> {
Expand Down

0 comments on commit 04242a8

Please sign in to comment.