mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 16:01:20 +02:00
*neutrino usermenu plugin: fix plugin call
Plugin call was broken because of a merge error. add config parameter 'index' and 'key' for plugins This allows (optional) to config an user definied sort and setup rc-key for plugin via plugin.cfg. Sort by filename is still working as before in second instance. git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1660 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
@@ -160,7 +160,8 @@ void CPlugins::loadPlugins()
|
||||
scanDir(PLUGINDIR_USB);
|
||||
scanDir(PLUGINDIR_VAR);
|
||||
scanDir(PLUGINDIR);
|
||||
sort(plugin_list.begin(), plugin_list.end());
|
||||
|
||||
sort (plugin_list.begin(), plugin_list.end());
|
||||
}
|
||||
|
||||
CPlugins::~CPlugins()
|
||||
@@ -182,6 +183,8 @@ bool CPlugins::parseCfg(plugin *plugin_data)
|
||||
while (linecount < 20 && getline(inFile, line[linecount++]))
|
||||
{};
|
||||
|
||||
plugin_data->index = 0;
|
||||
plugin_data->key = 0; //CRCInput::RC_nokey
|
||||
plugin_data->fb = false;
|
||||
plugin_data->rc = false;
|
||||
plugin_data->lcd = false;
|
||||
@@ -200,7 +203,15 @@ bool CPlugins::parseCfg(plugin *plugin_data)
|
||||
getline(iss, cmd, '=');
|
||||
getline(iss, parm, '=');
|
||||
|
||||
if (cmd == "pluginversion")
|
||||
if (cmd == "index")
|
||||
{
|
||||
plugin_data->index = atoi(parm.c_str());
|
||||
}
|
||||
else if (cmd == "key")
|
||||
{
|
||||
plugin_data->key = atoi(parm.c_str());
|
||||
}
|
||||
else if (cmd == "pluginversion")
|
||||
{
|
||||
plugin_data->version = atoi(parm.c_str());
|
||||
}
|
||||
|
Reference in New Issue
Block a user