aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Components/DreamInfoHandler.py
diff options
context:
space:
mode:
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>2008-07-03 13:03:53 +0000
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>2008-07-03 13:03:53 +0000
commita7ebf0a0c2b03f8ffc7244d2b73440be00cb85d2 (patch)
treef0c36fbf5c6ced40654aa2554bb6b1c022de6535 /lib/python/Components/DreamInfoHandler.py
parent89cd5ceb75dd5b59ff58a549402541a983d42ccd (diff)
downloadenigma2-a7ebf0a0c2b03f8ffc7244d2b73440be00cb85d2.tar.gz
enigma2-a7ebf0a0c2b03f8ffc7244d2b73440be00cb85d2.zip
fix prerequisite logic and add hardware detection to list of possible prerequisites (needs driver update)
Diffstat (limited to 'lib/python/Components/DreamInfoHandler.py')
-rw-r--r--lib/python/Components/DreamInfoHandler.py19
1 files changed, 15 insertions, 4 deletions
diff --git a/lib/python/Components/DreamInfoHandler.py b/lib/python/Components/DreamInfoHandler.py
index f9bd479e..8e34632c 100644
--- a/lib/python/Components/DreamInfoHandler.py
+++ b/lib/python/Components/DreamInfoHandler.py
@@ -3,6 +3,7 @@ from Tools.Directories import crawlDirectory, resolveFilename, SCOPE_CONFIG, SCO
from Components.NimManager import nimmanager
from Components.Ipkg import IpkgComponent
from Components.config import config, configfile
+from Tools.HardwareInfo import HardwareInfo
from enigma import eConsoleAppContainer, eDVBDB
import os
@@ -97,6 +98,7 @@ class DreamInfoHandler:
STATUS_INIT = 4
def __init__(self, statusCallback, blocking = False, neededTag = None):
+ self.hardware_info = HardwareInfo()
self.directory = "/"
self.neededTag = neededTag
@@ -165,14 +167,19 @@ class DreamInfoHandler:
if int(sat) not in nimmanager.getConfiguredSats():
return False
if prerequisites.has_key("bcastsystem"):
+ has_system = False
for bcastsystem in prerequisites["bcastsystem"]:
if nimmanager.hasNimType(bcastsystem):
- return True
- return False
+ has_system = True
+ if not has_system:
+ return False
if prerequisites.has_key("hardware"):
+ hardware_found = False
for hardware in prerequisites["hardware"]:
- # TODO: hardware detection
- met = True
+ if hardware == self.hardware_info.device_name:
+ hardware_found = True
+ if not hardware_found:
+ return False
return True
def installPackages(self, indexes):
@@ -186,6 +193,10 @@ class DreamInfoHandler:
self.installPackage(self.installIndexes[self.currentlyInstallingMetaIndex])
def installPackage(self, index):
+ print "self.packageslist:", self.packageslist
+ if len(self.packageslist) <= index:
+ print "no package with index", index, "found... installing nothing"
+ return
print "installing package with index", index, "and name", self.packageslist[index][0]["attributes"]["name"]
attributes = self.packageslist[index][0]["attributes"]