aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Components
diff options
context:
space:
mode:
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>2006-10-10 13:46:16 +0000
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>2006-10-10 13:46:16 +0000
commitd29dad2c2d56f1664fd7bedf08b5e45ceb85d47c (patch)
tree83852628d3c9a723b31a8c614a82d3d5dcd5668d /lib/python/Components
parent40a2670abe4fb1e3d161b93ffbf4a441d729918a (diff)
downloadenigma2-d29dad2c2d56f1664fd7bedf08b5e45ceb85d47c.tar.gz
enigma2-d29dad2c2d56f1664fd7bedf08b5e45ceb85d47c.zip
use service compare strings instead of eServiceReferences in parental control
Diffstat (limited to 'lib/python/Components')
-rw-r--r--lib/python/Components/ParentalControl.py25
1 files changed, 12 insertions, 13 deletions
diff --git a/lib/python/Components/ParentalControl.py b/lib/python/Components/ParentalControl.py
index f8a6dff2..97e9fad5 100644
--- a/lib/python/Components/ParentalControl.py
+++ b/lib/python/Components/ParentalControl.py
@@ -37,26 +37,25 @@ class ParentalControl:
self.tries = 3
def addWhitelistService(self, service):
- self.whitelist.append(service.toCompareString())
+ self.whitelist.append(service)
def addBlacklistService(self, service):
- self.blacklist.append(service.toCompareString())
+ self.blacklist.append(service)
def setServiceLevel(self, service, level):
- self.serviceLevel[service.toCompareString()] = level
+ self.serviceLevel[service] = level
def deleteWhitelistService(self, service):
- self.whitelist.remove(service.toCompareString())
- if self.serviceLevel.has_key(service.toCompareString()):
- self.serviceLevel.remove(service.toCompareString())
+ self.whitelist.remove(service)
+ if self.serviceLevel.has_key(service):
+ self.serviceLevel.remove(service)
def deleteBlacklistService(self, service):
- self.blacklist.remove(service.toCompareString())
- if self.serviceLevel.has_key(service.toCompareString()):
- self.serviceLevel.remove(service.toCompareString())
+ self.blacklist.remove(service)
+ if self.serviceLevel.has_key(service):
+ self.serviceLevel.remove(service)
- def isServicePlayable(self, serviceref, callback):
- service = serviceref.toCompareString()
+ def isServicePlayable(self, service, callback):
if not config.ParentalControl.configured.value:
return True
print "whitelist:", self.whitelist
@@ -80,10 +79,10 @@ class ParentalControl:
print "protect"
print "config.ParentalControl.type.value:", config.ParentalControl.type.value
if config.ParentalControl.type.value == "whitelist":
- if service.toCompareString() in self.whitelist:
+ if service in self.whitelist:
self.deleteWhitelistService(service)
else: # blacklist
- if service.toCompareString() not in self.blacklist:
+ if service not in self.blacklist:
self.addBlacklistService(service)
print "whitelist:", self.whitelist
print "blacklist:", self.blacklist