remap keymap.xml and InfoBarGenerics.py

BubbleSoap

Vu+ Newbie
Hi there,

quick question,
Black Hole 2.0.9
Im trying to remap the EPG button on the remote to run the Cool TV guide plugin (directly without going through "long blue" or "long EPG" button).

how can I do it?
I already have some experience in the past modding this function to be able to use the EPG button to run directly the Multi Graph EPG
so:
/usr/share/enigma2/keymap.xml
Code:
  <map context="InfobarEPGActions">
     <key id="KEY_INFO" mapto="showGraphEPG" flags="m" />
     <key id="KEY_VIDEO" mapto="showGraphEPG" flags="m" />
  </map>

and:
/usr/lib/enigma2/python/Screens/InfoBarGenerics.py
Code:
class InfoBarSimpleEventView:
    """ Opens the Eventview for now/next """
    def __init__(self):
        self["EPGActions"] = HelpableActionMap(self, "InfobarEPGActions",
            {
                "showEventInfo": (self.openEventView, _("show event details")),
                "showGraphEPG": (self.openGraphEPG, _("Graphical Multi EPG")),
                "showInfobarOrEpgWhenInfobarAlreadyVisible": self.showEventInfoWhenNotVisible,
            })
 
    def openGraphEPG(self):
        for p in plugins.getPlugins(where = PluginDescriptor.WHERE_EVENTINFO):
        if p.name == _("Graphical Multi EPG"):
            self.runPlugin(p)
                break

But now, Id like to do the same to run directly Cool TV Guide Plugin by firing the EPG BUTTON, how can I do that? Im struggling....
I know I can do it easily with multiquickbutton-vu_2.7.5-r0_mipsel_2.ipk, but I like to mod things by hand.
How can I add Cool Tv Guide into InfoBarGenerics.py ?

Kindest regards,
;)

Edit by moderator: Live Link removed, moved to correct section.
 
Last edited by a moderator:

BubbleSoap

Vu+ Newbie
I tried

keymap.xml
Code:
  <map context="InfobarEPGActions">
    <key id="KEY_INFO" mapto="showCoolTVGuide" flags="m" />
    <key id="KEY_VIDEO" mapto="showCoolTVGuide" flags="m" />
  </map>

InfoBarGenerics.py
Code:
class InfoBarEPG:
""" EPG - Opens an EPG list when the showEPGList action fires """
    def showCoolTVGuide(self):
        if Directories.fileExists("/usr/lib/enigma2/python/Plugins/Extensions/CoolTVGuide/plugin.pyo"):
            for plugin in plugins.getPlugins([PluginDescriptor.WHERE_EXTENSIONSMENU, PluginDescriptor.WHERE_EVENTINFO]):
                if plugin.name == _("Cool TV Guide"):
                    self.runPlugin(plugin)
                    break
        else:
            self.session.open(MessageBox, _("The Cool TV Guide plugin is not installed!\nPlease install it."), type = MessageBox.TYPE_INFO,timeout = 10 )

but it wouldnt work yet.
any suggestion ?

kindest regards...
 
Top