diff options
author | Jonathan Marshall <jmarshall@never.you.mind> | 2011-01-24 21:44:39 +1300 |
---|---|---|
committer | Jonathan Marshall <jmarshall@never.you.mind> | 2011-01-24 22:18:04 +1300 |
commit | be61ebdc9e897fe40c6f371111724de79ddee8d5 (patch) | |
tree | d989e4ad3cf956e9e3cc22cf94d46df735ef9feb | |
parent | 3e87c698891338d04fcda8eef77ba49f6da1bc0e (diff) |
fixed: #11109 - addons with 2 or more extension points only showed the first extension point within the XBMC UI.
-rw-r--r-- | xbmc/addons/Addon.cpp | 21 | ||||
-rw-r--r-- | xbmc/addons/Addon.h | 2 |
2 files changed, 11 insertions, 12 deletions
diff --git a/xbmc/addons/Addon.cpp b/xbmc/addons/Addon.cpp index 2cec15dc5f..d59f682fcd 100644 --- a/xbmc/addons/Addon.cpp +++ b/xbmc/addons/Addon.cpp @@ -243,23 +243,22 @@ CStdString AddonVersion::Print() const y.Empty(); \ } -AddonProps::AddonProps(cp_plugin_info_t *props) - : id(props->identifier) - , version(props->version) - , name(props->name) - , path(props->plugin_path) - , author(props->provider_name) +AddonProps::AddonProps(const cp_extension_t *ext) + : id(ext->plugin->identifier) + , version(ext->plugin->version) + , name(ext->plugin->name) + , path(ext->plugin->plugin_path) + , author(ext->plugin->provider_name) , stars(0) { - //FIXME only considers the first registered extension for each addon - if (props->extensions->ext_point_id) - type = TranslateType(props->extensions->ext_point_id); + if (ext->ext_point_id) + type = TranslateType(ext->ext_point_id); icon = "icon.png"; fanart = CUtil::AddFileToFolder(path, "fanart.jpg"); changelog = CUtil::AddFileToFolder(path, "changelog.txt"); // Grab more detail from the props... - const cp_extension_t *metadata = CAddonMgr::Get().GetExtension(props, "xbmc.addon.metadata"); + const cp_extension_t *metadata = CAddonMgr::Get().GetExtension(ext->plugin, "xbmc.addon.metadata"); if (metadata) { summary = CAddonMgr::Get().GetTranslatedString(metadata->configuration, "summary"); @@ -279,7 +278,7 @@ AddonProps::AddonProps(cp_plugin_info_t *props) */ CAddon::CAddon(const cp_extension_t *ext) - : m_props(ext ? ext->plugin : NULL) + : m_props(ext) , m_parent(AddonPtr()) { BuildLibName(ext); diff --git a/xbmc/addons/Addon.h b/xbmc/addons/Addon.h index 0a04eeda58..47a8d5f921 100644 --- a/xbmc/addons/Addon.h +++ b/xbmc/addons/Addon.h @@ -70,7 +70,7 @@ public: { } - AddonProps(cp_plugin_info_t *props); + AddonProps(const cp_extension_t *ext); bool operator==(const AddonProps &rhs) { |