Skip to content

Commit

Permalink
fixed: #11109 - addons with 2 or more extension points only showed th…
Browse files Browse the repository at this point in the history
…e first extension point within the XBMC UI.
  • Loading branch information
Jonathan Marshall committed Jan 24, 2011
1 parent 3e87c69 commit be61ebd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
21 changes: 10 additions & 11 deletions xbmc/addons/Addon.cpp
Expand Up @@ -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");
Expand All @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion xbmc/addons/Addon.h
Expand Up @@ -70,7 +70,7 @@ class AddonProps
{
}

AddonProps(cp_plugin_info_t *props);
AddonProps(const cp_extension_t *ext);

bool operator==(const AddonProps &rhs)
{
Expand Down

0 comments on commit be61ebd

Please sign in to comment.