Skip to content

Commit

Permalink
better STB support
Browse files Browse the repository at this point in the history
  • Loading branch information
persianpros committed Jan 4, 2013
1 parent e5fae31 commit 94d45d9
Showing 1 changed file with 61 additions and 33 deletions.
94 changes: 61 additions & 33 deletions plugin/controllers/models/info.py
Expand Up @@ -17,6 +17,7 @@
from Tools.Directories import fileExists, pathExists
from time import time, localtime, strftime
from enigma import eDVBVolumecontrol, eServiceCenter
from Tools.StbHardware import getFPVersion

import os
import sys
Expand Down Expand Up @@ -61,41 +62,75 @@ def getInfo():
# TODO: get webif versione somewhere!
info = {}

brand = "Dream Multimedia"
brand = "DreamBox"
model = "unknown"
chipset = "unknown"

if fileExists("/proc/stb/info/boxtype"):
brand = "Xtrend"
f = open("/proc/stb/info/boxtype",'r')
model = f.readline().strip()
if model.startswith("et"):
brand = "Xtrend"

if fileExists("/proc/stb/info/hwmodel"):
brand = "Technomate"
file = open("/proc/stb/info/hwmodel")
model = file.read().strip().lower()
file.close()
if model == "tmtwinoe":
model = "TM Twin OE"
elif model == "tm2toe":
model = "TM 2T OE"
elif model == "tmsingle":
model = "TM Single"
elif model == "twin":
model = "TM Twin"
elif model == "ios100hd":
model = "IOS100"
elif model == "ios200hd":
model = "IOS200"
elif model == "ios300hd":
model = "IOS300"
elif fileExists("/proc/stb/info/boxtype"):
file = open("/proc/stb/info/boxtype")
model = file.read().strip().lower()
file.close()
if model == "gigablue":
brand = "GigaBlue"
file = open("/proc/stb/info/gbmodel")
model = file.read().strip().lower()
file.close()
if model.startswith("et"):
brand = "Xtrend"
if model == "et9500":
model = "et9x00"
elif model.startswith("ini"):
brand = "INI-Series"
brand = "Venton"
elif model.startswith("xp"):
brand = "XP-Series"
f.close()
elif fileExists("/proc/stb/info/vumodel"):
brand = "Vuplus"
f = open("/proc/stb/info/vumodel",'r')
model = f.readline().strip()
f.close()
brand = "MaxDigital"
elif model.startswith("odin"):
brand = "Odin"
elif model.startswith("ebox"):
brand = "EBox"
model = "ebox5000"
elif model.startswith("ixuss"):
brand = "Medi@link"
model = "ixussone"
chipset = "BCM7405"
elif fileExists("/proc/stb/info/azmodel"):
brand = "AZBOX"
f = open("/proc/stb/info/model",'r')
model = f.readline().strip()
f.close()
if model == "me":
brand = "AZBox"
file = open("/proc/stb/info/azmodel")
model = file.read().strip().lower()
file.close()
if model == "me":
chipset = "SIGMA 8655"
elif model == "minime":
elif model == "minime":
chipset = "SIGMA 8653"
else:
else:
chipset = "SIGMA 8634"
elif fileExists("/proc/stb/info/vumodel"):
brand = "VuPlus"
file = open("/proc/stb/info/vumodel")
model = file.read().strip().lower()
file.close()
else:
f = open("/proc/stb/info/model",'r')
model = f.readline().strip()
f.close()
file = open("/proc/stb/info/model")
model = file.read().strip().lower()
file.close()

info['brand'] = brand
info['model'] = model
Expand Down Expand Up @@ -146,14 +181,7 @@ def getInfo():
info['imagever'] = imagever
info['enigmaver'] = about.getEnigmaVersionString()
info['kernelver'] = about.getKernelVersionString()

try:
from Tools.StbHardware import getFPVersion
except ImportError:
from Tools.DreamboxHardware import getFPVersion

info['fp_version'] = getFPVersion()

info['tuners'] = []
for i in range(0, nimmanager.getSlotCount()):
info['tuners'].append({
Expand Down

1 comment on commit 94d45d9

@jbleyel
Copy link
Contributor

@jbleyel jbleyel commented on 94d45d9 Feb 3, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i cannot merge this in case of missing StbHardware on Dreambox images
you should also support original DMM Images

Please sign in to comment.