#69: Fixing user input from scraper. It now does an exact name search (#123)

* #69: Fixing user input from scraper. It now does an exact name search for the game. Anything not found by the normal game search can be found through this. It does not fail on special characters or when there are only three letter words.
This commit is contained in:
Daniel 2017-05-04 11:33:45 -04:00 committed by Jools Wills
parent 006e716e64
commit c2b76aaa73

View file

@ -70,10 +70,15 @@ void thegamesdb_generate_scraper_requests(const ScraperSearchParams& params, std
std::string path = "thegamesdb.net/api/GetGame.php?";
std::string cleanName = params.nameOverride;
if(cleanName.empty())
if (cleanName.empty())
{
cleanName = params.game->getCleanName();
path += "name=" + HttpReq::urlEncode(cleanName);
path += "name=" + HttpReq::urlEncode(cleanName);
}
else
{
path += "exactname=" + HttpReq::urlEncode(cleanName);
}
if(params.system->getPlatformIds().empty())
{