Get global guisetting.xml setting in PVR addon
#1
Hey guys.

Currently i am adding the possibility to change the default lifetime of recordings in the mediaportal pvr addon.
My changes are working except one thing i am struggling with.

This is my code:
Quote:  /* Read setting "pvrrecord.defaultlifetime" from guisettings.xml */
  if (!XBMC->GetSetting("pvrrecord.defaultlifetime", &g_KeepDaysDefault))
  {
      /* If setting is unknown fallback to defaults */
      XBMC->Log(LOG_ERROR, "Couldn't get 'keepmethodtype' setting, falling back to 'Always' as default");
      g_KeepDaysDefault = 100;
}
  and sadly it always fails with:
 
Quote:22:47:06.650 T:9140   ERROR: CAddonCallbacksAddon - V1::KodiAPI::AddOn::CAddonCallbacksAddon::GetAddonSetting - can't find setting 'pvrrecord.defaultlifetime' in 'MediaPortal PVR Client'

How do i'll read an setting from guisettings.xml in the file client.cpp of the mediaportal pvr addon?

thx
pOpY
Reply
#2
Found the function which XBMC->GetSetting references to from the pvr addon dll:
Quote:ool CAddonCallbacksAddon::GetAddonSetting(void *addonData, const char *strSettingName, void *settingValue)
Seems that in this function your just able to read the addon settings.xml itself and not the guisettings.xml from Kodi.
I am not very deep in kodi development and doesnt know much of its archtiecture.

Would be nice if anybody could point me into the right direction how ill can read from an pvr dll addon an "global" kodi setting from guisetting.xml?

Help would be appreciated  Angel

thx
pOpY
Reply

Logout Mark Read Team Forum Stats Members Help
Get global guisetting.xml setting in PVR addon0