forked from azbox-enigma2/keymapconfig
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplugin.py
More file actions
32 lines (25 loc) · 847 Bytes
/
plugin.py
File metadata and controls
32 lines (25 loc) · 847 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
from Plugins.Plugin import PluginDescriptor
from Components.PluginComponent import plugins
from Components.config import config
import KeymapConfig
import MonkeyPatch
def main(session, *args, **kwargs):
print("[Keymap Config]")
try:
session.open(KeymapConfig.KeymapConfig)
except Exception as e:
print("[Keymap Config] Error: %s" % e)
def menu(session, *args, **kwargs):
print("KWARGS", kwargs)
if session == "system":
return [
(_("Keymap Config"), main, "keymap_config", None)
]
return []
def Plugins(*args, **kwargs):
name = _("Keymap Config")
descr = _("Config custom remote control keymaps")
return [
PluginDescriptor(where=PluginDescriptor.WHERE_MENU, fnc=menu, needsRestart=True),
PluginDescriptor(where=PluginDescriptor.WHERE_SESSIONSTART, fnc=MonkeyPatch.autostart, needsRestart=True, weight=99999999999)
]