Skip to content

Commit

Permalink
fixed: mixed nfo's potentially broken since the scraper engine refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
spiff committed Aug 17, 2011
1 parent dcc5403 commit 2e2b8b3
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions xbmc/addons/Scraper.cpp
Expand Up @@ -424,11 +424,20 @@ CScraperUrl CScraper::NfoUrl(const CStdString &sNfoContent)
with start and end-tags we're not able to use it.
Check for the desired Elements instead.
*/
TiXmlElement* pId = doc.FirstChildElement("id");
TiXmlElement* pxeUrl=NULL;
TiXmlElement* pId=NULL;
if (!strcmp(doc.RootElement()->Value(),"details"))
{
pxeUrl = doc.RootElement()->FirstChildElement("url");
pId = doc.RootElement()->FirstChildElement("id");
}
else
{
pId = doc.FirstChildElement("id");
pxeUrl = doc.FirstChildElement("url");
}
if (pId && pId->FirstChild())
scurlRet.strId = pId->FirstChild()->Value();

TiXmlElement* pxeUrl = doc.FirstChildElement("url");
if (pxeUrl)
scurlRet.ParseElement(pxeUrl);
else if (!strcmp(doc.RootElement()->Value(), "url"))
Expand Down

0 comments on commit 2e2b8b3

Please sign in to comment.