2009-03-05, 17:23
Hi,
I'm trying to add new value for the HTTP-API command "getguisetting".
I've added this line to "GUISetting.cpp"
"myvideos.watchmode" is the setting to "show/hide" watched media from listing. It's stored in "guisettings.xml"
With this code line, "myvideos.watchmode" can be requested with HTTP-API getguisetting but if the value change from XBMC UI it's not refreshed before restart.
I look at "guisettings.xml" and the entry
is showing twice.
In fact the setting is loaded/saved in "Settings.cpp" with
and
If I comment this line in "SaveSettings" the double entry in "guisettings.xml" disappear but of course the setting is never saved anymore.
Any idea to make a match between the node in the "Settings.cpp" and the one I Created in "GUISettings.cpp"?
I also noticed that all other settings in "GuiSettings.cpp" like
aren't declared in "SaveSettings" from "Settings.cpp" but are still saved in "guisettings.xml". Where is the trick?
Thanks for helping!
I'm trying to add new value for the HTTP-API command "getguisetting".
I've added this line to "GUISetting.cpp"
Code:
void CGUISettings::Initialize()
{
...
AddInt(5, "myvideos.watchmode", 16100, VIDEO_SHOW_ALL, VIDEO_SHOW_ALL, 1, VIDEO_SHOW_WATCHED, SPIN_CONTROL_TEXT);
...
}
"myvideos.watchmode" is the setting to "show/hide" watched media from listing. It's stored in "guisettings.xml"
With this code line, "myvideos.watchmode" can be requested with HTTP-API getguisetting but if the value change from XBMC UI it's not refreshed before restart.
I look at "guisettings.xml" and the entry
Code:
<watchmode>1</watchmode>
In fact the setting is loaded/saved in "Settings.cpp" with
Code:
bool CSettings::LoadSettings(const CStdString& strSettingsFile)
{
...
GetInteger(pElement, "watchmode", g_stSettings.m_iMyVideoWatchMode, VIDEO_SHOW_ALL, VIDEO_SHOW_ALL, VIDEO_SHOW_WATCHED);
...
}
Code:
bool CSettings::SaveSettings(const CStdString& strSettingsFile, CGUISettings *localSettings /* = NULL */) const
{
...
XMLUtils::SetInt(pNode, "watchmode", g_stSettings.m_iMyVideoWatchMode);
...
}
If I comment this line in "SaveSettings" the double entry in "guisettings.xml" disappear but of course the setting is never saved anymore.
Any idea to make a match between the node in the "Settings.cpp" and the one I Created in "GUISettings.cpp"?
I also noticed that all other settings in "GuiSettings.cpp" like
Code:
AddCategory(5, "myvideos", 16000);
AddBool(1, "myvideos.treatstackasfile", 20051, true);
AddInt(2, "myvideos.resumeautomatically", 12017, RESUME_ASK, RESUME_NO, 1, RESUME_ASK, SPIN_CONTROL_TEXT);
AddBool(3, "myvideos.autothumb",12024, false);
AddBool(4, "myvideos.cleanfilenames", 20418, false);
Thanks for helping!