All pastes #190007 Raw Edit

Donno

public cpp v1 · immutable
·published 2006-10-03 16:55 UTC
rendered paste body
 if (iButton == btnDownload)  {    CFileItem item(*pItem);    CHTTP http;    CStdString strURL;    if (item.m_musicInfoTag.GetTitle() != "")    {      strURL.Format("http://www.megaxkey.com/unleashx.php?gameid=%s",item.m_musicInfoTag.GetTitle());      string theHtml;      CLog::Log(LOGINFO,"GSM: %s",  theHtml.c_str());      if (http.Get(strURL, theHtml))      {        CLog::Log(LOGINFO,"GSM: %s",  theHtml.c_str());        TiXmlDocument gsXml;        gsXml.Parse(theHtml.c_str(), 0);        TiXmlElement *pRootElement = gsXml.RootElement();        if (pRootElement)        {          if (pRootElement->Value())          {            if (strcmpi(pRootElement->Value(),"xboxsaves") == 0)            {              TiXmlElement* pGame = pRootElement->FirstChildElement("game");              if (pGame)              {                TiXmlElement* pSave = pGame->FirstChildElement("save");                CGUIDialogSelect *pDlg = (CGUIDialogSelect*)m_gWindowManager.GetWindow(WINDOW_DIALOG_SELECT);                if (pDlg)                {                  pDlg->SetHeading(20317); // change to say Select Save to Download                  pDlg->Reset();                  pDlg->EnableButton(false);                  while (pSave)                  {                    if (pSave->Value())                    {                        //thedesc = pSave->Attribute("desc");                        pDlg->Add(pSave->Attribute("desc"));                        //theurl  = pSave->Attribute("url"); << need to save this to an array                    }                  }                                                   //pDlg->Sort();                  pDlg->DoModal();                  int iSelectedSave = pDlg->GetSelectedLabel();                  //now use iSelected save on the list with the urls :D then downlaod it and extract using zipmanager                }              }            }          }        }      }    }  }