X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/7f219531682843b95e48bc51365718f4b5fb86da..27af195d31298de858014931bdbe06fee1d244e4:/lib/python/Components/DreamInfoHandler.py diff --git a/lib/python/Components/DreamInfoHandler.py b/lib/python/Components/DreamInfoHandler.py index 570143da..f9bd479e 100644 --- a/lib/python/Components/DreamInfoHandler.py +++ b/lib/python/Components/DreamInfoHandler.py @@ -22,8 +22,7 @@ class InfoHandler(xml.sax.ContentHandler): self.elements = [] self.validFileTypes = ["skin", "config", "services", "favourites", "package"] self.prerequisitesMet = prerequisiteMet - - + def printError(self, error): print "Error in defaults xml files:", error raise InfoHandlerParseError, error @@ -110,6 +109,7 @@ class DreamInfoHandler: self.console = eConsoleAppContainer() self.console.appClosed.get().append(self.installNext) + self.reloadFavourites = False self.statusCallback = statusCallback self.setStatus(self.STATUS_INIT) @@ -157,6 +157,8 @@ class DreamInfoHandler: if prerequisites.has_key("tag"): if not self.neededTag in prerequisites["tag"]: return False + else: + return False if prerequisites.has_key("satellite"): for sat in prerequisites["satellite"]: @@ -198,6 +200,10 @@ class DreamInfoHandler: self.statusCallback(self.status, None) def installNext(self, *args, **kwargs): + if self.reloadFavourites: + self.reloadFavourites = False + db = eDVBDB.getInstance().reloadBouquets() + self.currentIndex += 1 attributes = self.installingAttributes #print "attributes:", attributes @@ -211,10 +217,13 @@ class DreamInfoHandler: else: print "increment meta index to install next package" self.currentlyInstallingMetaIndex += 1 + self.currentAttributeIndex = 0 self.installPackage(self.installIndexes[self.currentlyInstallingMetaIndex]) + return self.setStatus(self.STATUS_WORKING) + print "currentAttributeIndex:", self.currentAttributeIndex currentAttribute = self.attributeNames[self.currentAttributeIndex] print "installing", currentAttribute, "with index", self.currentIndex @@ -303,7 +312,8 @@ class DreamInfoHandler: def installFavourites(self, directory, name): print "installing favourites:", directory, " - ", name - + self.reloadFavourites = True + if self.blocking: os.system("cp %s %s" % ((directory + name), resolveFilename(SCOPE_CONFIG))) self.installNext()