mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 07:51:19 +02:00
- plugins: Fix assignment of prefered keys
New keyword in plugin.cfg: key=<key> * key=red * key=green * key=yellow * key=blue * key=auto If entry is missing key is auto-assigned
This commit is contained in:
@@ -199,7 +199,7 @@ bool CPlugins::parseCfg(plugin *plugin_data)
|
||||
{};
|
||||
|
||||
plugin_data->index = sindex++;
|
||||
plugin_data->key = 0; //CRCInput::RC_nokey
|
||||
plugin_data->key = CRCInput::RC_nokey;
|
||||
#if 0
|
||||
plugin_data->fb = false;
|
||||
plugin_data->rc = false;
|
||||
@@ -232,9 +232,9 @@ bool CPlugins::parseCfg(plugin *plugin_data)
|
||||
{
|
||||
plugin_data->index = atoi(parm);
|
||||
}
|
||||
else if (cmd == "pluginversion")
|
||||
else if (cmd == "key")
|
||||
{
|
||||
plugin_data->key = atoi(parm);
|
||||
plugin_data->key = getPluginKey(parm);
|
||||
}
|
||||
else if (cmd == "name")
|
||||
{
|
||||
@@ -571,3 +571,17 @@ CPlugins::i_type_t CPlugins::getPluginIntegration(int integration)
|
||||
return I_TYPE_DISABLED;
|
||||
}
|
||||
}
|
||||
|
||||
neutrino_msg_t CPlugins::getPluginKey(std::string key)
|
||||
{
|
||||
if (key == "red")
|
||||
return CRCInput::RC_red;
|
||||
else if (key == "green")
|
||||
return CRCInput::RC_green;
|
||||
else if (key == "yellow")
|
||||
return CRCInput::RC_yellow;
|
||||
else if (key == "blue")
|
||||
return CRCInput::RC_blue;
|
||||
else /* (key == "auto") */
|
||||
return CRCInput::RC_nokey;
|
||||
}
|
||||
|
Reference in New Issue
Block a user