mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 14:15:38 +00:00
Updated the ScreenScraper error handling slightly.
Also added the possibility to hide a folder in the same way as a game file.
This commit is contained in:
parent
fe891812d3
commit
3cea714f9c
|
@ -43,7 +43,8 @@ MetaDataDecl folderDecls[] = {
|
|||
{"developer", MD_STRING, "unknown", false, "developer", "enter game developer", true},
|
||||
{"publisher", MD_STRING, "unknown", false, "publisher", "enter game publisher", true},
|
||||
{"genre", MD_STRING, "unknown", false, "genre", "enter game genre", true},
|
||||
{"players", MD_INT, "unknown", false, "players", "enter number of players", true}
|
||||
{"players", MD_INT, "unknown", false, "players", "enter number of players", true},
|
||||
{"hidden", MD_BOOL, "false", false, "hidden", "enter hidden off/on", false}
|
||||
};
|
||||
const std::vector<MetaDataDecl> folderMDD(folderDecls, folderDecls +
|
||||
sizeof(folderDecls) / sizeof(folderDecls[0]));
|
||||
|
|
|
@ -176,6 +176,13 @@ void ScreenScraperRequest::process(const std::unique_ptr<HttpReq>& req,
|
|||
assert(req->status() == HttpReq::REQ_SUCCESS);
|
||||
|
||||
pugi::xml_document doc;
|
||||
|
||||
// It seems as if screenscraper.fr has changed their API slightly and now just returns
|
||||
// a simple text messsage upon not finding any matching game. If we don't return here,
|
||||
// we will get a pugixml error trying to process this string as an XML message.
|
||||
if (req->getContent().find("Erreur : Rom") == 0)
|
||||
return;
|
||||
|
||||
pugi::xml_parse_result parseResult = doc.load_string(req->getContent().c_str());
|
||||
|
||||
if (!parseResult) {
|
||||
|
|
Loading…
Reference in a new issue