Skip to content
Browse files

fixed: Addons weren't installed correctly

git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@30415 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
  • Loading branch information...
1 parent cd2be2f commit 92afa2e289a95afb06556282973dd3d33ed758ef jmarshallnz committed May 22, 2010
Showing with 15 additions and 1 deletion.
  1. +1 −1 xbmc/GUIWindowAddonBrowser.cpp
  2. +13 −0 xbmc/addons/AddonManager.cpp
  3. +1 −0 xbmc/addons/AddonManager.h
View
2 xbmc/GUIWindowAddonBrowser.cpp
@@ -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);
View
13 xbmc/addons/AddonManager.cpp
@@ -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
View
1 xbmc/addons/AddonManager.h
@@ -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:

0 comments on commit 92afa2e

Please sign in to comment.
Something went wrong with that request. Please try again.