Skip to content

Commit

Permalink
[retroplayer/api] - (1003) add "extensions" and "platforms" to xbmc.A…
Browse files Browse the repository at this point in the history
…ddon.getAddonInfo()
  • Loading branch information
garbear committed Oct 27, 2015
1 parent 411ad38 commit 945d52e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
16 changes: 16 additions & 0 deletions xbmc/interfaces/legacy/Addon.cpp
Expand Up @@ -159,6 +159,22 @@ namespace XBMCAddon
return ADDON::TranslateType(pAddon->Type());
else if (strcmpi(id, "version") == 0)
return pAddon->Version().asString();
else if (strcmpi(id, "platforms") == 0)
{
InfoMap::const_iterator it;
if ((it = pAddon->Props().extrainfo.find("platforms")) != pAddon->Props().extrainfo.end())
return String(it->second.c_str());
else
return String();
}
else if (strcmpi(id, "extensions") == 0)
{
InfoMap::const_iterator it;
if ((it = pAddon->Props().extrainfo.find("extensions")) != pAddon->Props().extrainfo.end())
return String(it->second.c_str());
else
return String();
}
else
throw AddonException("'%s' is an invalid Id", id);
}
Expand Down
4 changes: 3 additions & 1 deletion xbmc/interfaces/legacy/Addon.h
Expand Up @@ -124,7 +124,9 @@ namespace XBMCAddon
* id : string - id of the property that the module needs to access.
*
* *Note, choices are (author, changelog, description, disclaimer, fanart. icon, id, name, path,\n
* profile, stars, summary, type, version)
* profile, stars, summary, type, version, platforms, extensions)
*
* *Note, platforms and extensions are only available for kodi.gameclient addons, and "" otherwise
*
* example:
* - version = self.Addon.getAddonInfo('version')
Expand Down

0 comments on commit 945d52e

Please sign in to comment.