39
40
41
42
43
44
45
46
47
48
49
50
51
52
53 | def __init__(self, parent):
self.parent = parent
conf.add_plugin_defaults(self.meta, self.module)
try:
for i,keyname in enumerate(conf.switch_key.split(",")): # allow multiple keys
keybinder.bind(keyname, self.switch, ((-1 if i else +1))) # forward +1 or backward -1
except:
__print__(dbg.ERR, "plugin global_key: Key `%s` could not be registered" % conf.switch_key)
# key event
def switch(self, num, *any):
# bookmarks, favourite
channel, cat = conf.switch_channel.split(":") |
|
| 39
40
41
42
43
44
45
46
47
48
49
50
51
52
53 | def __init__(self, parent):
self.parent = parent
conf.add_plugin_defaults(self.meta, self.module)
try:
for i,keyname in enumerate(conf.switch_key.split(",")): # allow multiple keys
keybinder.bind(keyname, self.switch, ((-1 if i else +1))) # forward +1 or backward -1
except:
log.ERR("plugin global_key: Key `%s` could not be registered" % conf.switch_key)
# key event
def switch(self, num, *any):
# bookmarks, favourite
channel, cat = conf.switch_channel.split(":") |