Skip to content

Commit

Permalink
added: special setting __addonpath__ to libXBMC_addon::GetSettings()
Browse files Browse the repository at this point in the history
returns the path for an addon
  • Loading branch information
notspiff committed Aug 10, 2014
1 parent f147350 commit 3cfb7ab
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions xbmc/addons/AddonCallbacksAddon.cpp
Expand Up @@ -190,6 +190,12 @@ bool CAddonCallbacksAddon::GetAddonSetting(void *addonData, const char *strSetti
{
CLog::Log(LOGDEBUG, "CAddonCallbacksAddon - %s - add-on '%s' requests setting '%s'", __FUNCTION__, addonHelper->m_addon->Name().c_str(), strSettingName);

if (strcasecmp(strSettingName, "__addonpath__") == 0)
{
strcpy((char*) settingValue, addonHelper->m_addon->Path().c_str());
return true;
}

if (!addonHelper->m_addon->ReloadSettings())
{
CLog::Log(LOGERROR, "CAddonCallbacksAddon - %s - could't get settings for add-on '%s'", __FUNCTION__, addonHelper->m_addon->Name().c_str());
Expand Down

0 comments on commit 3cfb7ab

Please sign in to comment.