allow disable of service validation
authorFelix Domke <tmbinc@elitedvb.net>
Sun, 15 Oct 2006 12:48:55 +0000 (12:48 +0000)
committerFelix Domke <tmbinc@elitedvb.net>
Sun, 15 Oct 2006 12:48:55 +0000 (12:48 +0000)
lib/python/Components/Sources/ServiceList.py

index 4d18415..91a6866 100644 (file)
@@ -2,10 +2,11 @@ from Source import Source
 from enigma import eServiceCenter, eServiceReference
 
 class ServiceList(Source):
 from enigma import eServiceCenter, eServiceReference
 
 class ServiceList(Source):
-       def __init__(self, root, command_func = None):
+       def __init__(self, root, command_func = None, validate_commands = True):
                Source.__init__(self)
                self.root = root
                self.command_func = command_func
                Source.__init__(self)
                self.root = root
                self.command_func = command_func
+               self.validate_commands = validate_commands
 
        def getServicesAsList(self, format = "SN"):
                services = self.getServiceList()
 
        def getServicesAsList(self, format = "SN"):
                services = self.getServiceList()
@@ -34,7 +35,7 @@ class ServiceList(Source):
        def handleCommand(self, cmd):
                print "ServiceList handle command"
                
        def handleCommand(self, cmd):
                print "ServiceList handle command"
                
-               if not self.validateReference(cmd):
+               if self.validate_commands and not self.validateReference(cmd):
                        print "Service reference did not validate!"
                        return
 
                        print "Service reference did not validate!"
                        return