X-Git-Url: http://code.vuplus.com/gitweb/?a=blobdiff_plain;f=lib%2Fpython%2FComponents%2FPluginComponent.py;h=c91d6ad5a3f3b650d76a44a95290cf452a05fa1f;hb=614c8a7a33de31665c7b7c0bc8cbcaa8ed353e91;hp=d72e2af36f1414c8ee4cc43c1ede6845c5644e6e;hpb=c0ebc011a78dd85727b3d91de8cbf271a25b8819;p=vuplus_dvbapp diff --git a/lib/python/Components/PluginComponent.py b/lib/python/Components/PluginComponent.py old mode 100644 new mode 100755 index d72e2af..c91d6ad --- a/lib/python/Components/PluginComponent.py +++ b/lib/python/Components/PluginComponent.py @@ -63,7 +63,7 @@ class PluginComponent: continue # allow single entry not to be a list - if type(plugins) is not list: + if not isinstance(plugins, list): plugins = [ plugins ] for p in plugins: @@ -91,14 +91,14 @@ class PluginComponent: def getPlugins(self, where): """Get list of plugins in a specific category""" - if type(where) is not list: + if not isinstance(where, list): where = [ where ] res = [ ] for x in where: - for p in self.plugins.get(x, [ ]): - res.append(p) - return res + res.extend(self.plugins.get(x, [ ])) + + return res def getPluginsForMenu(self, menuid): res = [ ] @@ -121,7 +121,7 @@ class PluginComponent: wakeup = -1 for p in self.pluginList: current = p.getWakeupTime() - if current > -1 and wakeup < current: + if current > -1 and (wakeup > current or wakeup == -1): wakeup = current return int(wakeup)