aboutsummaryrefslogtreecommitdiff
path: root/lib/python
diff options
context:
space:
mode:
Diffstat (limited to 'lib/python')
-rw-r--r--lib/python/Components/NimManager.py124
-rwxr-xr-xlib/python/Plugins/Extensions/DVDPlayer/plugin.py19
-rwxr-xr-xlib/python/Plugins/Extensions/MediaPlayer/plugin.py11
-rwxr-xr-x[-rw-r--r--]lib/python/Plugins/SystemPlugins/NFIFlash/flasher.py14
-rwxr-xr-x[-rw-r--r--]lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py14
5 files changed, 97 insertions, 85 deletions
diff --git a/lib/python/Components/NimManager.py b/lib/python/Components/NimManager.py
index 9520f972..2deb2bf7 100644
--- a/lib/python/Components/NimManager.py
+++ b/lib/python/Components/NimManager.py
@@ -293,17 +293,9 @@ class SecConfigure:
sec.setLNBLOFH(10600000)
sec.setLNBThreshold(11700000)
elif currLnb.lof.value == "unicable":
- if currLnb.unicable.value == "unicable_user":
-#TODO satpositions for satcruser
- sec.setLNBLOFL(currLnb.lofl.value * 1000)
- sec.setLNBLOFH(currLnb.lofh.value * 1000)
- sec.setLNBThreshold(currLnb.threshold.value * 1000)
- sec.setLNBSatCR(currLnb.satcruser.index)
- sec.setLNBSatCRvco(currLnb.satcrvcouser[currLnb.satcruser.index].value*1000)
- sec.setLNBSatCRpositions(1) #HACK
- elif currLnb.unicable.value == "unicable_matrix":
- manufacturer_name = currLnb.unicableMatrixManufacturer.value
- manufacturer = currLnb.unicableMatrix[manufacturer_name]
+ def setupUnicable(configManufacturer, ProductDict):
+ manufacturer_name = configManufacturer.value
+ manufacturer = ProductDict[manufacturer_name]
product_name = manufacturer.product.value
sec.setLNBSatCR(manufacturer.scr[product_name].index)
sec.setLNBSatCRvco(manufacturer.vco[product_name][manufacturer.scr[product_name].index].value*1000)
@@ -311,22 +303,22 @@ class SecConfigure:
sec.setLNBLOFL(manufacturer.lofl[product_name][0].value * 1000)
sec.setLNBLOFH(manufacturer.lofh[product_name][0].value * 1000)
sec.setLNBThreshold(manufacturer.loft[product_name][0].value * 1000)
- currLnb.unicableMatrixManufacturer.save_forced = True
+ configManufacturer.save_forced = True
manufacturer.product.save_forced = True
manufacturer.vco[product_name][manufacturer.scr[product_name].index].save_forced = True
+
+ if currLnb.unicable.value == "unicable_user":
+#TODO satpositions for satcruser
+ sec.setLNBLOFL(currLnb.lofl.value * 1000)
+ sec.setLNBLOFH(currLnb.lofh.value * 1000)
+ sec.setLNBThreshold(currLnb.threshold.value * 1000)
+ sec.setLNBSatCR(currLnb.satcruser.index)
+ sec.setLNBSatCRvco(currLnb.satcrvcouser[currLnb.satcruser.index].value*1000)
+ sec.setLNBSatCRpositions(1) #HACK
+ elif currLnb.unicable.value == "unicable_matrix":
+ setupUnicable(currLnb.unicableMatrixManufacturer, currLnb.unicableMatrix)
elif currLnb.unicable.value == "unicable_lnb":
- manufacturer_name = currLnb.unicableLnbManufacturer.value
- manufacturer = currLnb.unicableLnb[manufacturer_name]
- product_name = manufacturer.product.value
- sec.setLNBSatCR(manufacturer.scr[product_name].index)
- sec.setLNBSatCRvco(manufacturer.vco[product_name][manufacturer.scr[product_name].index].value*1000)
- sec.setLNBSatCRpositions(manufacturer.positions[product_name][0].value)
- sec.setLNBLOFL(manufacturer.lofl[product_name][0].value * 1000)
- sec.setLNBLOFH(manufacturer.lofh[product_name][0].value * 1000)
- sec.setLNBThreshold(manufacturer.loft[product_name][0].value * 1000)
- currLnb.unicableLnbManufacturer.save_forced = True
- manufacturer.product.save_forced = True
- manufacturer.vco[product_name][manufacturer.scr[product_name].index].save_forced = True
+ setupUnicable(currLnb.unicableLnbManufacturer, currLnb.unicableLnb)
elif currLnb.lof.value == "c_band":
sec.setLNBLOFL(5150000)
sec.setLNBLOFH(5150000)
@@ -1138,72 +1130,60 @@ def InitNimManager(nimmgr):
else:
section.unicable = ConfigSelection(choices = {"unicable_user": _("User defined")}, default = "unicable_user")
- if lnb < 3:
- section.unicableMatrix = ConfigSubDict()
- section.unicableMatrixManufacturer = ConfigSelection(choices = UnicableMatrixManufacturers, default = UnicableMatrixManufacturers[0])
- for y in unicablematrixproducts:
- products = unicablematrixproducts[y].keys()
+ def fillUnicableConf(sectionDict, unicableproducts, vco_null_check):
+ for y in unicableproducts:
+ products = unicableproducts[y].keys()
products.sort()
tmp = ConfigSubsection()
tmp.product = ConfigSelection(choices = products, default = products[0])
tmp.scr = ConfigSubDict()
tmp.vco = ConfigSubDict()
+ tmp.lofl = ConfigSubDict()
+ tmp.lofh = ConfigSubDict()
+ tmp.loft = ConfigSubDict()
+ tmp.positions = ConfigSubDict()
for z in products:
scrlist = []
- vcolist = unicablematrixproducts[y][z]
+ vcolist = unicableproducts[y][z]
tmp.vco[z] = ConfigSubList()
for cnt in range(1,1+len(vcolist)-1):
vcofreq = int(vcolist[cnt-1])
- if vcofreq == 0:
+ if vcofreq == 0 and vco_null_check:
scrlist.append(("%d" %cnt,"SCR %d " %cnt +_("not used")))
else:
scrlist.append(("%d" %cnt,"SCR %d" %cnt))
tmp.vco[z].append(ConfigInteger(default=vcofreq, limits = (vcofreq, vcofreq)))
- tmp.scr[z] = ConfigSelection(choices = scrlist, default = scrlist[0][0])
- section.unicableMatrix[y] = tmp
+ tmp.scr[z] = ConfigSelection(choices = scrlist, default = scrlist[0][0])
+
+ positions = int(vcolist[len(vcolist)-1][0])
+ tmp.positions[z] = ConfigSubList()
+ tmp.positions[z].append(ConfigInteger(default=positions, limits = (positions, positions)))
+
+ lofl = vcolist[len(vcolist)-1][1]
+ tmp.lofl[z] = ConfigSubList()
+ tmp.lofl[z].append(ConfigInteger(default=lofl, limits = (lofl, lofl)))
+
+ lofh = int(vcolist[len(vcolist)-1][2])
+ tmp.lofh[z] = ConfigSubList()
+ tmp.lofh[z].append(ConfigInteger(default=lofh, limits = (lofh, lofh)))
+
+ loft = int(vcolist[len(vcolist)-1][3])
+ tmp.loft[z] = ConfigSubList()
+ tmp.loft[z].append(ConfigInteger(default=loft, limits = (loft, loft)))
+ sectionDict[y] = tmp
+
+ if lnb < 3:
+ print "MATRIX"
+ section.unicableMatrix = ConfigSubDict()
+ section.unicableMatrixManufacturer = ConfigSelection(UnicableMatrixManufacturers, UnicableMatrixManufacturers[0])
+ fillUnicableConf(section.unicableMatrix, unicablematrixproducts, True)
if lnb < 2:
+ print "LNB"
section.unicableLnb = ConfigSubDict()
section.unicableLnbManufacturer = ConfigSelection(UnicableLnbManufacturers, UnicableLnbManufacturers[0])
- for y in unicablelnbproducts:
- products = unicablelnbproducts[y].keys()
- products.sort()
- tmp = ConfigSubsection()
- tmp.product = ConfigSelection(choices = products, default = products[0])
- tmp.scr = ConfigSubDict()
- tmp.vco = ConfigSubDict()
- tmp.lofl = ConfigSubDict()
- tmp.lofh = ConfigSubDict()
- tmp.loft = ConfigSubDict()
- tmp.positions = ConfigSubDict()
- for z in products:
- scrlist = []
- vcolist = unicablelnbproducts[y][z]
- tmp.vco[z] = ConfigSubList()
- for cnt in range(1,1+len(vcolist)-1):
- scrlist.append(("%d" %cnt,"SCR %d" %cnt))
- vcofreq = int(vcolist[cnt-1])
- tmp.vco[z].append(ConfigInteger(default=vcofreq, limits = (vcofreq, vcofreq)))
- tmp.scr[z] = ConfigSelection(choices = scrlist, default = scrlist[0][0])
-
- positions = int(vcolist[len(vcolist)-1][0])
- tmp.positions[z] = ConfigSubList()
- tmp.positions[z].append(ConfigInteger(default=positions, limits = (positions, positions)))
-
- lofl = vcolist[len(vcolist)-1][1]
- tmp.lofl[z] = ConfigSubList()
- tmp.lofl[z].append(ConfigInteger(default=lofl, limits = (lofl, lofl)))
-
- lofh = int(vcolist[len(vcolist)-1][2])
- tmp.lofh[z] = ConfigSubList()
- tmp.lofh[z].append(ConfigInteger(default=lofh, limits = (lofh, lofh)))
-
- loft = int(vcolist[len(vcolist)-1][3])
- tmp.loft[z] = ConfigSubList()
- tmp.loft[z].append(ConfigInteger(default=loft, limits = (loft, loft)))
-
- section.unicableLnb[y] = tmp
-
+ fillUnicableConf(section.unicableLnb, unicablelnbproducts, False)
+
#TODO satpositions for satcruser
section.satcruser = ConfigSelection(advanced_lnb_satcruser_choices, default="1")
tmp = ConfigSubList()
diff --git a/lib/python/Plugins/Extensions/DVDPlayer/plugin.py b/lib/python/Plugins/Extensions/DVDPlayer/plugin.py
index e092e82f..64b4ae50 100755
--- a/lib/python/Plugins/Extensions/DVDPlayer/plugin.py
+++ b/lib/python/Plugins/Extensions/DVDPlayer/plugin.py
@@ -88,8 +88,8 @@ class FileBrowser(Screen):
self.close(None)
class DVDSummary(Screen):
- skin = """
- <screen position="0,0" size="132,64">
+ skin = (
+ """<screen name="DVDSummary" position="0,0" size="132,64" id="1">
<widget source="session.CurrentService" render="Label" position="5,4" size="120,28" font="Regular;12" transparent="1" >
<convert type="ServiceName">Name</convert>
</widget>
@@ -101,7 +101,20 @@ class DVDSummary(Screen):
<widget source="session.CurrentService" render="Progress" position="6,46" size="60,18" borderWidth="1" >
<convert type="ServicePosition">Position</convert>
</widget>
- </screen>"""
+ </screen>""",
+ """<screen name="DVDSummary" position="0,0" size="96,64" id="2">
+ <widget source="session.CurrentService" render="Label" position="0,0" size="96,25" font="Regular;12" transparent="1" >
+ <convert type="ServiceName">Name</convert>
+ </widget>
+ <widget name="DVDPlayer" position="0,26" size="96,12" font="Regular;10" transparent="1" />
+ <widget name="Chapter" position="0,40" size="66,12" font="Regular;10" transparent="1" halign="left" />
+ <widget source="session.CurrentService" render="Label" position="66,40" size="30,12" font="Regular;10" transparent="1" halign="right" >
+ <convert type="ServicePosition">Position</convert>
+ </widget>
+ <widget source="session.CurrentService" render="Progress" position="0,52" size="96,12" borderWidth="1" >
+ <convert type="ServicePosition">Position</convert>
+ </widget>
+ </screen>""")
def __init__(self, session, parent):
Screen.__init__(self, session, parent)
diff --git a/lib/python/Plugins/Extensions/MediaPlayer/plugin.py b/lib/python/Plugins/Extensions/MediaPlayer/plugin.py
index 15806e8c..e4bdba12 100755
--- a/lib/python/Plugins/Extensions/MediaPlayer/plugin.py
+++ b/lib/python/Plugins/Extensions/MediaPlayer/plugin.py
@@ -925,12 +925,17 @@ class MediaPlayer(Screen, InfoBarBase, InfoBarSeek, InfoBarAudioSelection, InfoB
self.clear_playlist()
class MediaPlayerLCDScreen(Screen):
- skin = """
- <screen position="0,0" size="132,64" title="LCD Text">
+ skin = (
+ """<screen name="MediaPlayerLCDScreen" position="0,0" size="132,64" id="1">
<widget name="text1" position="4,0" size="132,35" font="Regular;16"/>
<widget name="text3" position="4,36" size="132,14" font="Regular;10"/>
<widget name="text4" position="4,49" size="132,14" font="Regular;10"/>
- </screen>"""
+ </screen>""",
+ """<screen name="MediaPlayerLCDScreen" position="0,0" size="96,64" id="2">
+ <widget name="text1" position="0,0" size="96,35" font="Regular;14"/>
+ <widget name="text3" position="0,36" size="96,14" font="Regular;10"/>
+ <widget name="text4" position="0,49" size="96,14" font="Regular;10"/>
+ </screen>""")
def __init__(self, session, parent):
Screen.__init__(self, session)
diff --git a/lib/python/Plugins/SystemPlugins/NFIFlash/flasher.py b/lib/python/Plugins/SystemPlugins/NFIFlash/flasher.py
index 8986560b..7a0da851 100644..100755
--- a/lib/python/Plugins/SystemPlugins/NFIFlash/flasher.py
+++ b/lib/python/Plugins/SystemPlugins/NFIFlash/flasher.py
@@ -39,13 +39,19 @@ class writeNAND(Task):
self.output_line = data
class NFISummary(Screen):
- skin = """
- <screen position="0,0" size="132,64">
+ skin = (
+ """<screen name="NFISummary" position="0,0" size="132,64" id="1">
<widget source="title" render="Label" position="2,0" size="120,14" valign="center" font="Regular;12" />
<widget source="content" render="Label" position="2,14" size="120,34" font="Regular;12" transparent="1" zPosition="1" />
- <widget source="job_progresslabel" render="Label" position="66,50" size="60,14" font="Regular;12" transparent="1" halign="right" zPosition="0" />
<widget source="job_progressbar" render="Progress" position="2,50" size="66,14" borderWidth="1" />
- </screen>"""
+ <widget source="job_progresslabel" render="Label" position="66,50" size="60,14" font="Regular;12" transparent="1" halign="right" zPosition="0" />
+ </screen>""",
+ """<screen name="NFISummary" position="0,0" size="96,64" id="2">
+ <widget source="title" render="Label" position="0,0" size="96,14" valign="center" font="Regular;10" />
+ <widget source="content" render="Label" position="0,14" size="96,34" font="Regular;10" transparent="1" zPosition="1" />
+ <widget source="job_progressbar" render="Progress" position="0,50" size="50,14" borderWidth="1" />
+ <widget source="job_progresslabel" render="Label" position="50,50" size="46,14" font="Regular;10" transparent="1" halign="right" zPosition="0" />
+ </screen>""")
def __init__(self, session, parent):
Screen.__init__(self, session, parent)
diff --git a/lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py b/lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py
index 3c76685e..9b9044ee 100644..100755
--- a/lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py
+++ b/lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py
@@ -12,14 +12,22 @@ from Tools.HardwareInfo import HardwareInfo
config.misc.showtestcard = ConfigBoolean(default = False)
class VideoWizardSummary(WizardSummary):
- skin = """
- <screen position="0,0" size="132,64">
+ skin = (
+ """<screen name="VideoWizardSummary" position="0,0" size="132,64" id="1">
<widget name="text" position="6,4" size="120,40" font="Regular;12" transparent="1" />
<widget source="parent.list" render="Label" position="6,40" size="120,21" font="Regular;14">
<convert type="StringListSelection" />
</widget>
<!--widget name="pic" pixmap="%s" position="6,22" zPosition="10" size="64,64" transparent="1" alphatest="on"/-->
- </screen>""" #% (resolveFilename(SCOPE_PLUGINS, "SystemPlugins/Videomode/lcd_Scart.png"))
+ </screen>""",
+ """<screen name="VideoWizardSummary" position="0,0" size="96,64" id="2">
+ <widget name="text" position="0,4" size="96,40" font="Regular;12" transparent="1" />
+ <widget source="parent.list" render="Label" position="0,40" size="96,21" font="Regular;14">
+ <convert type="StringListSelection" />
+ </widget>
+ <!--widget name="pic" pixmap="%s" position="0,22" zPosition="10" size="64,64" transparent="1" alphatest="on"/-->
+ </screen>""")
+ #% (resolveFilename(SCOPE_PLUGINS, "SystemPlugins/Videomode/lcd_Scart.png"))
def __init__(self, session, parent):
WizardSummary.__init__(self, session, parent)