Skip to content
This repository has been archived by the owner on Apr 15, 2023. It is now read-only.

Commit

Permalink
fixed: Addons weren't installed correctly
Browse files Browse the repository at this point in the history
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@30415 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
  • Loading branch information
jmarshallnz committed May 22, 2010
1 parent cd2be2f commit 92afa2e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion xbmc/GUIWindowAddonBrowser.cpp
Expand Up @@ -306,7 +306,7 @@ void CGUIWindowAddonBrowser::OnJobComplete(unsigned int jobID,
CUtil::GetFileName(strFolder));
}
AddonPtr addon;
if (CAddonMgr::AddonFromInfoXML(strFolder,addon))
if (CAddonMgr::Get().CPAddonFromInfoXML(strFolder, addon))
{
CStdString strFolder2;
CUtil::GetDirectory(strFolder,strFolder2);
Expand Down
13 changes: 13 additions & 0 deletions xbmc/addons/AddonManager.cpp
Expand Up @@ -1017,6 +1017,19 @@ CStdString CAddonMgr::GetExtValue(cp_cfg_element_t *base, const char *path)
else return CStdString();
}

bool CAddonMgr::CPAddonFromInfoXML(const CStdString &path, AddonPtr &addon)
{
cp_status_t status;
cp_plugin_info_t *info = m_cpluff->load_plugin_descriptor(m_cp_context, _P(path).c_str(), &status);
if (info)
{
addon = Factory(info->extensions);
m_cpluff->release_info(m_cp_context, info);
return addon.get();
}
return false;
}

bool CAddonMgr::AddonsFromInfoXML(const TiXmlElement *root, VECADDONS &addons)
{
// create a context for these addons
Expand Down
1 change: 1 addition & 0 deletions xbmc/addons/AddonManager.h
Expand Up @@ -105,6 +105,7 @@ namespace ADDON
/* libcpluff */
CStdString GetExtValue(cp_cfg_element_t *base, const char *path);
const cp_extension_t *GetExtension(const cp_plugin_info_t *props, const char *extension);
bool CPAddonFromInfoXML(const CStdString &path, AddonPtr &addon);
bool AddonsFromInfoXML(const TiXmlElement *root, VECADDONS &addons);

private:
Expand Down

0 comments on commit 92afa2e

Please sign in to comment.