Skip to content

Commit

Permalink
comments and code style
Browse files Browse the repository at this point in the history
  • Loading branch information
Gemba committed Mar 17, 2024
1 parent 06c1d96 commit f57c659
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
10 changes: 7 additions & 3 deletions src/scraperworker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@ void ScraperWorker::run() {

int lowestDistance = 666;
if (gameEntries.isEmpty()) {
// no hits, not even in cache.
// prepare expected title iff skipped is set true
if (config.brackets) {
// fix for issue #47
game.title = info.completeBaseName();
Expand Down Expand Up @@ -213,12 +215,13 @@ void ScraperWorker::run() {
game.sqrNotes = NameTools::getUniqueNotes(game.sqrNotes, '[');
game.parNotes = NameTools::getUniqueNotes(game.parNotes, '(');

if (game.found == false) {
if (!game.found) {
output.append("\033[1;33m---- Game '" + info.completeBaseName() +
"' not found :( ----\033[0m\n\n");
game.resetMedia();
if (!forceEnd)
if (!forceEnd) {
forceEnd = limitReached(output);
}
emit entryReady(game, output, debug);
if (forceEnd) {
break;
Expand All @@ -235,8 +238,9 @@ void ScraperWorker::run() {
"' match too low :| ----\033[0m\n\n");
game.found = false;
game.resetMedia();
if (!forceEnd)
if (!forceEnd) {
forceEnd = limitReached(output);
}
emit entryReady(game, output, debug);
if (forceEnd) {
break;
Expand Down
8 changes: 4 additions & 4 deletions src/skyscraper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -797,21 +797,21 @@ void Skyscraper::loadConfig(const QCommandLineParser &parser) {
config.scraper = parser.value("s");
}

// 3. Frontend specific configs, overrides main, platform, module and
// 3. Frontend specific configs, overrides platform, main and
// defaults
settings.beginGroup(config.frontend);
rtConf->applyConfigIni(RuntimeCfg::CfgType::FRONTEND, &settings,
inputFolderSet, gameListFolderSet, mediaFolderSet);
settings.endGroup();

// 4. Scraping module specific configs, overrides main, platform and
// defaults
// 4. Scraping module specific configs, overrides frontend, platform,
// main and defaults
settings.beginGroup(config.scraper);
rtConf->applyConfigIni(RuntimeCfg::CfgType::SCRAPER, &settings,
inputFolderSet, gameListFolderSet, mediaFolderSet);
settings.endGroup();

// 5. Command line configs, overrides main, platform, module and defaults
// 5. Command line configs, overrides all
rtConf->applyCli(inputFolderSet, gameListFolderSet, mediaFolderSet);

frontend->checkReqs();
Expand Down

0 comments on commit f57c659

Please sign in to comment.