projects
/
vuplus_dvbapp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lib/python/Components/VolumeControl.py: make the VolumeControl instance global access...
[vuplus_dvbapp]
/
lib
/
python
/
Components
/
PluginComponent.py
diff --git
a/lib/python/Components/PluginComponent.py
b/lib/python/Components/PluginComponent.py
old mode 100644
(file)
new mode 100755
(executable)
index
d72e2af
..
5e439fd
--- a/
lib/python/Components/PluginComponent.py
+++ b/
lib/python/Components/PluginComponent.py
@@
-46,7
+46,7
@@
class PluginComponent:
for pluginname in os_listdir(directory_category):
path = directory_category + "/" + pluginname
if os_path.isdir(path):
for pluginname in os_listdir(directory_category):
path = directory_category + "/" + pluginname
if os_path.isdir(path):
- if fileExists(path + "/plugin.pyc") or fileExists(path + "/plugin.py"):
+ if fileExists(path + "/plugin.pyc") or fileExists(path + "/plugin.py
o") or fileExists(path + "/plugin.py
"):
try:
plugin = my_import('.'.join(["Plugins", c, pluginname, "plugin"]))
try:
plugin = my_import('.'.join(["Plugins", c, pluginname, "plugin"]))
@@
-63,7
+63,7
@@
class PluginComponent:
continue
# allow single entry not to be a list
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:
plugins = [ plugins ]
for p in plugins:
@@
-91,14
+91,14
@@
class PluginComponent:
def getPlugins(self, where):
"""Get list of plugins in a specific category"""
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:
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 = [ ]
def getPluginsForMenu(self, menuid):
res = [ ]
@@
-121,7
+121,7
@@
class PluginComponent:
wakeup = -1
for p in self.pluginList:
current = p.getWakeupTime()
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)
wakeup = current
return int(wakeup)