From eec62de41252dd53b5b66845b60d03d9957e8728 Mon Sep 17 00:00:00 2001 From: arn354 Date: Thu, 8 Jan 2015 10:41:10 +0100 Subject: [PATCH] Add EMC to Hotkey --- lib/python/Screens/ButtonSetup.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/python/Screens/ButtonSetup.py b/lib/python/Screens/ButtonSetup.py index 5f8d1c53f87..6db5a47f8f6 100644 --- a/lib/python/Screens/ButtonSetup.py +++ b/lib/python/Screens/ButtonSetup.py @@ -183,6 +183,8 @@ def getButtonSetupFunctions(): for x in [x for x in os.listdir("/usr/script") if x.endswith(".sh")]: x = x[:-3] ButtonSetupFunctions.append((_("Shellscript") + " " + x, "Shellscript/" + x, "Shellscripts")) + if os.path.isfile("/usr/lib/enigma2/python/Plugins/Extensions/EnhancedMovieCenter/plugin.pyo"): + ButtonSetupFunctions.append((_("EnhancedMovieCenter"), "EMC/", "Plugins")) return ButtonSetupFunctions class ButtonSetup(Screen): @@ -523,4 +525,11 @@ def execButtonSetup(self, selected): if os.path.isfile(command) and os.path.isdir('/usr/lib/enigma2/python/Plugins/Extensions/PPanel'): from Plugins.Extensions.PPanel.ppanel import Execute self.session.open(Execute, selected[1] + " shellscript", None, command) + elif selected[0] == "EMC": + try: + from Plugins.Extensions.EnhancedMovieCenter.plugin import showMoviesNew + from Screens.InfoBar import InfoBar + open(showMoviesNew(InfoBar.instance)) + except Exception as e: + print('[EMCPlayer] showMovies exception:\n' + str(e))