diff options
| author | Stefan Pluecken <stefan.pluecken@multimedia-labs.de> | 2010-10-11 12:30:00 +0200 |
|---|---|---|
| committer | Stefan Pluecken <stefan.pluecken@multimedia-labs.de> | 2010-10-11 12:30:00 +0200 |
| commit | d21824019fe93603f1c05c7263ef7570aa60e135 (patch) | |
| tree | c761ff30e82cdf172676efe2c9cf93e6eaa571db /lib/python | |
| parent | 4cf4560a3dfc1a18f4bc894e153dc501965f4b0f (diff) | |
| download | enigma2-d21824019fe93603f1c05c7263ef7570aa60e135.tar.gz enigma2-d21824019fe93603f1c05c7263ef7570aa60e135.zip | |
refs bug #587
set empty tuner slots to supported
Diffstat (limited to 'lib/python')
| -rw-r--r-- | lib/python/Components/NimManager.py | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/python/Components/NimManager.py b/lib/python/Components/NimManager.py index 7f041902..815cfe35 100644 --- a/lib/python/Components/NimManager.py +++ b/lib/python/Components/NimManager.py @@ -481,7 +481,7 @@ class SecConfigure: self.update() class NIM(object): - def __init__(self, slot, type, description, has_outputs = True, internally_connectable = None, multi_type = {}, frontend_id = None): + def __init__(self, slot, type, description, has_outputs = True, internally_connectable = None, multi_type = {}, frontend_id = None, is_empty = False): self.slot = slot if type not in ("DVB-S", "DVB-C", "DVB-T", "DVB-S2", None): @@ -494,6 +494,7 @@ class NIM(object): self.internally_connectable = internally_connectable self.multi_type = multi_type self.frontend_id = frontend_id + self.__is_empty = is_empty def isCompatible(self, what): if not self.isSupported(): @@ -549,8 +550,12 @@ class NIM(object): def isMultiType(self): return (len(self.multi_type) > 0) + def isEmpty(self): + return self.__is_empty + + # empty tuners are supported! def isSupported(self): - return (self.frontend_id is not None) + return (self.frontend_id is not None) or self.__is_empty # returns dict {<slotid>: <type>} def getMultiTypeList(self): @@ -695,8 +700,10 @@ class NimManager: entries[current_slot] = {} elif line.strip().startswith("Type:"): entries[current_slot]["type"] = str(line.strip()[6:]) + entries[current_slot]["isempty"] = False elif line.strip().startswith("Name:"): entries[current_slot]["name"] = str(line.strip()[6:]) + entries[current_slot]["isempty"] = False elif line.strip().startswith("Has_Outputs:"): input = str(line.strip()[len("Has_Outputs:") + 1:]) entries[current_slot]["has_outputs"] = (input == "yes") @@ -717,6 +724,7 @@ class NimManager: elif line.strip().startswith("empty"): entries[current_slot]["type"] = None entries[current_slot]["name"] = _("N/A") + entries[current_slot]["isempty"] = True nimfile.close() from os import path @@ -736,7 +744,7 @@ class NimManager: entry["frontend_device"] = entry["internally_connectable"] = None if not (entry.has_key("multi_type")): entry["multi_type"] = {} - self.nim_slots.append(NIM(slot = id, description = entry["name"], type = entry["type"], has_outputs = entry["has_outputs"], internally_connectable = entry["internally_connectable"], multi_type = entry["multi_type"], frontend_id = entry["frontend_device"])) + self.nim_slots.append(NIM(slot = id, description = entry["name"], type = entry["type"], has_outputs = entry["has_outputs"], internally_connectable = entry["internally_connectable"], multi_type = entry["multi_type"], frontend_id = entry["frontend_device"], is_empty = entry["isempty"])) def hasNimType(self, chktype): for slot in self.nim_slots: |
