Hi,
I am *very* interested in this topic. This issue has been a significant cause of frustration for me in refactoring Enigma2 code.
This issue appears to be mostly resolved on OE-Alliance images by using the boxbranding module. I know this is not welcomed on OpenPLi but it could be one solution to this issue. Huevos offered a Python implementation to OpenPLi but that doesn't appear to have gone anywhere.
Rather than importing yet another module into may Enigma2 modules I would like to suggest that we use the existing SystemInfo dictionary mechanism. This would allow all Enigma2 code and plugins access an already globally available module to get this extra information.
In my new Setup refactor I now have the following code:
from Components.SystemInfo import SystemInfo
...
itemText = itemText.replace("%s %s", "%s %s" % (SystemInfo["MachineBrand"], SystemInfo["MachineName"]))
itemDescription = itemDescription.replace("%s %s", "%s %s" % (SystemInfo["MachineBrand"], SystemInfo["MachineName"]))
In SystemInfo.py on OpenViX I have:
from boxbranding import getBoxType, getBrandOEM, getDisplayType, getHaveAVJACK, getHaveHDMIinFHD, getHaveHDMIinHD, getHaveRCA, getHaveSCART, getHaveYUV, getMachineBrand, getMachineBuild, getMachineMtdRoot, getMachineName
...
SystemInfo["MachineBrand"] = getMachineBrand()
SystemInfo["MachineName"] = getMachineName()
In SystemInfo.py on OpenPLi I have:
from Tools.HardwareInfo import HardwareInfo
...
model = HardwareInfo().get_device_model()
SystemInfo["MachineBrand"] = HardwareInfo().get_machine_name()
SystemInfo["MachineName"] = model
My point is that within Setup.py I use one defined API to get system information and on each image that information is provided by whatever mechanism is deemed appropriate.
What is critically important is to define a list of all these SystemInfo dictionary entry keys that will hold all the information desired. I would like to suggest that we use the list from the OE-Alliance boxbranding as a starting point and then define and publish the keys that will be used and what those keys will hold.
Regards,
Ian.