diff options
| author | Stefan Pluecken <stefan.pluecken@multimedia-labs.de> | 2010-10-11 12:37:49 +0200 |
|---|---|---|
| committer | Stefan Pluecken <stefan.pluecken@multimedia-labs.de> | 2010-10-11 12:37:49 +0200 |
| commit | 0951e9fb3386f8f941a7756910ff7162ebb98a4a (patch) | |
| tree | c4cf3158bcdfb42abb6dfa8bc900808a906dfc16 /lib/python/Components | |
| parent | fb9f45f86fe3c793acf781ffbdee18c24857ffa7 (diff) | |
| parent | d21824019fe93603f1c05c7263ef7570aa60e135 (diff) | |
| download | enigma2-0951e9fb3386f8f941a7756910ff7162ebb98a4a.tar.gz enigma2-0951e9fb3386f8f941a7756910ff7162ebb98a4a.zip | |
Merge branch 'bug_587_new_internally_connectable_and_unsupported_tuner_management' into experimental
Conflicts:
lib/python/Components/NimManager.py
Diffstat (limited to 'lib/python/Components')
| -rw-r--r-- | lib/python/Components/NimManager.py | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/lib/python/Components/NimManager.py b/lib/python/Components/NimManager.py index 2ece5e65..73031861 100644 --- a/lib/python/Components/NimManager.py +++ b/lib/python/Components/NimManager.py @@ -481,8 +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, i2c = None): - + def __init__(self, slot, type, description, has_outputs = True, internally_connectable = None, multi_type = {}, frontend_id = None, i2c = None, is_empty = False): self.slot = slot if type not in ("DVB-S", "DVB-C", "DVB-T", "DVB-S2", None): @@ -496,6 +495,7 @@ class NIM(object): self.multi_type = multi_type self.i2c = i2c self.frontend_id = frontend_id + self.__is_empty = is_empty def isCompatible(self, what): if not self.isSupported(): @@ -554,8 +554,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): @@ -700,8 +704,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") @@ -725,6 +731,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 @@ -746,8 +753,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"], i2c = entry["i2c"])) - + 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"], i2c = entry["i2c"], is_empty = entry["isempty"])) def hasNimType(self, chktype): for slot in self.nim_slots: |
