Skip to content

Commit

Permalink
Now unescapes title in getBestEntry()
Browse files Browse the repository at this point in the history
  • Loading branch information
muldjord committed Feb 19, 2018
1 parent 9a0ff3b commit 539dc2e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/scraperworker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ void ScraperWorker::run()
game.title = game.title.remove(0, 4).simplified().append(", The");
}

game.title = StrTools::xmlUnescape(game.title);
// Don't unescape title since we already did that in getBestEntry()
game.videoFile = StrTools::xmlUnescape(config.videosFolder + "/" + info.completeBaseName() + "." + game.videoFormat);
game.description = StrTools::xmlUnescape(game.description);
game.releaseDate = StrTools::xmlUnescape(game.releaseDate);
Expand Down Expand Up @@ -352,6 +352,7 @@ GameEntry ScraperWorker::getBestEntry(const QList<GameEntry> &gameEntries,
int compareNumeral = StrTools::getNumeral(compareTitle);
// Start by applying rules we are certain are needed. Add the ones that pass to potentials
foreach(GameEntry entry, gameEntries) {
entry.title = StrTools::xmlUnescape(entry.title);
int entryNumeral = StrTools::getNumeral(entry.title);
// If numerals don't match, skip.
// Numeral defaults to 1, even for games without a numeral.
Expand Down

0 comments on commit 539dc2e

Please sign in to comment.