Tp info in channel selector, useful for checking services in userbouquets.... Perhaps better as a configurable gui option, even if needs enigma restart to take completely effect
(channel selector height reduction).
skin PLi HD:
--- ~/usr/share/enigma2/PLi-HD/skin.xml
+++ ~/usr/share/enigma2/PLi-HD/skin.xml
@@ -256,6 +256,15 @@
<convert type="EventName">FullDescription</convert>
</widget>
<widget source="ServiceEvent" render="NextEpgInfo" position="85,590" size="435,26" transparent="1" foregroundColor="secondFG" noWrap="1" font="Regular;22"/>
+ <widget source="ServiceEvent" render="Label" position="550,585" size="620,26" transparent="1" foregroundColor="green" backgroundColor="secondBG" noWrap="1" font="Regular;24" borderWidth="2" zPosition="1">
+ <convert type="TransponderInfo"/>
+ </widget>
+ <applet type="onLayoutFinish">
+from enigma import eSize
+from Components.config import config
+if config.usage.tspinfo_in_channelselection.value:
+ self["list"].instance.resize(eSize(690, 450))
+ </applet>
</screen>
<!-- Slim Channel Selection - I still not found were this is used -->
transponder info converter:
From b91239f422ad43f5cf1d452ce15005e6a25f6d7b Mon Sep 17 00:00:00 2001
From: tension <tension9000@yahoo.it>
Date: Wed, 15 Oct 2014 14:42:47 +0200
Subject: [PATCH 3/4] Add label for transponderparameters info in channel
selector
Add label for transponderparameters info in channel selector
---
lib/python/Components/Converter/Makefile.am | 2 +-
lib/python/Components/Converter/TransponderInfo.py | 79 ++++++++++++++++++++++
2 files changed, 80 insertions(+), 1 deletion(-)
create mode 100644 lib/python/Components/Converter/TransponderInfo.py
diff --git a/lib/python/Components/Converter/Makefile.am b/lib/python/Components/Converter/Makefile.am
index be73645..ed21a87 100644
--- a/lib/python/Components/Converter/Makefile.am
+++ b/lib/python/Components/Converter/Makefile.am
@@ -5,6 +5,6 @@ install_PYTHON = \
Poll.py RemainingToText.py StringList.py ServiceName.py FrontendInfo.py ServiceInfo.py \
ConditionalShowHide.py ServicePosition.py ValueRange.py RdsInfo.py Streaming.py \
StaticMultiList.py ServiceTime.py MovieInfo.py MenuEntryCompare.py StringListSelection.py \
- ServiceOrbitalPosition.py CryptoInfo.py TextCase.py \
+ ServiceOrbitalPosition.py TransponderInfo.py CryptoInfo.py TextCase.py \
ValueBitTest.py TunerInfo.py ConfigEntryTest.py TemplatedMultiContent.py ProgressToText.py \
Combine.py SensorToText.py ValueToPixmap.py PliExtraInfo.py genre.py ChannelNumbers.py
diff --git a/lib/python/Components/Converter/TransponderInfo.py b/lib/python/Components/Converter/TransponderInfo.py
new file mode 100644
index 0000000..845ee24
--- /dev/null
+++ b/lib/python/Components/Converter/TransponderInfo.py
@@ -0,0 +1,79 @@
+# -*- coding: utf-8 -*-
+from Components.Converter.Converter import Converter
+from enigma import iServiceInformation, iPlayableService, iPlayableServicePtr, eServiceCenter
+from ServiceReference import resolveAlternate
+from Tools.Transponder import ConvertToHumanReadable
+
+from Components.Element import cached
+
+def addSeparator(pdata, pname, sep=" "):
+ if pdata:
+ return pdata + sep
+ else:
+ return pname + ": N/A" + sep
+
+class TransponderInfo(Converter, object):
+
+ def __init__(self, type):
+ Converter.__init__(self, type)
+
+ @cached
+ def getText(self):
+ service = self.source.service
+ if isinstance(service, iPlayableServicePtr):
+ info = service and service.info()
+ ref = None
+ else: # reference
+ info = service and self.source.info
+ ref = service
+ if not info:
+ return ""
+ if ref:
+ nref = resolveAlternate(ref)
+ if nref:
+ ref = nref
+ info = eServiceCenter.getInstance().info(ref)
+ transponder_info = info.getInfoObject(ref, iServiceInformation.sTransponderData)
+ else:
+ transponder_info = info.getInfoObject(iServiceInformation.sTransponderData)
+
+ if transponder_info:
+ tunerType = transponder_info["tuner_type"]
+ tpinfo = ConvertToHumanReadable(transponder_info, tunerType)
+ if tunerType == "DVB-T":
+ return addSeparator(tpinfo["system"], "DVB system") + addSeparator("%.1f" % ((transponder_info["frequency"] +500) / 1000000.), "Fr", "/") \
+ + addSeparator(tpinfo["bandwidth"], "Bw") + addSeparator(tpinfo["constellation"], "Cn") \
+ + addSeparator(tpinfo["code_rate_lp"], "CrL", "-") + addSeparator(tpinfo["code_rate_hp"], "CrH")
+# other parameters available, but without tuner sint we get only "Auto" value, as for constellation and coderates
+# transmission = tpinfo["transmission_mode"]
+# guard = tpinfo["guard_interval"]
+# hierarchy = tpinfo["hierarchy_information"]
+ else:
+ if tunerType == "DVB-S":
+ pos = int(transponder_info["orbital_position"])
+ direction = "E"
+ if pos > 1800:
+ pos = 3600 - pos
+ direction = "W"
+ return addSeparator(tpinfo["system"], "DVB system") + addSeparator("%d.%d%s" % (pos/10, pos%10, direction), "Orb") \
+ + addSeparator(tpinfo["modulation"], "Mod") + addSeparator(str(int(transponder_info["frequency"] / 1000)), "Fr", " ") \
+ + addSeparator(tpinfo["polarization_abbreviation"], "Pol") + addSeparator(str(int(transponder_info["symbol_rate"] / 1000)), "Sr") \
+ + addSeparator(tpinfo["fec_inner"], "Fec")
+ elif tunerType == "DVB-C":
+ return addSeparator(tpinfo["system"], "DVB system") + addSeparator(tpinfo["modulation"], "Mod") \
+ + addSeparator("%.1f" % ((transponder_info["frequency"] +500) / 1000000.), "Fr") \
+ + addSeparator(tpinfo["fec_inner"], "Fec") + addSeparator(tpinfo["inversion"], "Inv")
+
+ if ref:
+ refString = ref.toString().lower()
+ if "%3a//" in refString:
+ return _("Stream")
+ if refString.startswith("1:134:"):
+ return _("Alternative")
+ return ""
+
+ text = property(getText)
+
+ def changed(self, what):
+ if what[0] != self.CHANGED_SPECIFIC or what[1] in [iPlayableService.evStart]:
+ Converter.changed(self, what)
--
1.9.1
user config control:
From 44ec0a6354e38ca01f5b02524f68a94a072e680a Mon Sep 17 00:00:00 2001
From: tension <tension9000@yahoo.it>
Date: Fri, 17 Oct 2014 15:00:40 +0200
Subject: [PATCH 4/4] Make channel selection tpinfo configurable option
Make channel selection tpinfo configurable option.
Select this option in user interface screen.
---
data/setup.xml | 1 +
lib/python/Components/Converter/TransponderInfo.py | 3 +++
lib/python/Components/UsageConfig.py | 1 +
3 files changed, 5 insertions(+)
diff --git a/data/setup.xml b/data/setup.xml
index b195a94..7102524 100644
--- a/data/setup.xml
+++ b/data/setup.xml
@@ -48,6 +48,7 @@
<item level="2" text="Enable OK for channel selection" description="When enabled you get the channel selection list via the OK button, the infobar toggle is then transfered to exit button">config.usage.ok_is_channelselection</item>
<item level="2" text="Enable volume control with arrow buttons" description="When enabled you can control the volume with the arrow buttons instead of getting the channel selection list">config.usage.volume_instead_of_channelselection</item>
<item level="2" text="Enable OK as preview in channel selection" description="When enabled then when you select a new channel in the channel selection the channel selection will not close. It will only close when you select the current playing service. This is a kind of preview mode">config.usage.channelselection_preview</item>
+ <item level="2" text="View transponder info in channel selection" description="When enabled then when you change channel in the channel selection a label shows channel transponder parameters">config.usage.tspinfo_in_channelselection</item>
<item level="1" text="Change bouquets in quickzap" description="When enabled, continue to the next bouquet when the last channel of the current bouquet is reached while changing channels.">config.usage.quickzap_bouquet_change</item>
<item level="1" text="Hide channel list in radio mode" description="When enabled, the channel selection list will be hidden while listening to a radio channel">config.usage.e1like_radio_mode</item>
<item level="1" text="Action on long powerbutton press" description="Configure the function of a long press on the power button.">config.usage.on_long_powerpress</item>
diff --git a/lib/python/Components/Converter/TransponderInfo.py b/lib/python/Components/Converter/TransponderInfo.py
index 845ee24..461c6cc 100644
--- a/lib/python/Components/Converter/TransponderInfo.py
+++ b/lib/python/Components/Converter/TransponderInfo.py
@@ -2,6 +2,7 @@
from Components.Converter.Converter import Converter
from enigma import iServiceInformation, iPlayableService, iPlayableServicePtr, eServiceCenter
from ServiceReference import resolveAlternate
+from Components.config import config
from Tools.Transponder import ConvertToHumanReadable
from Components.Element import cached
@@ -19,6 +20,8 @@ class TransponderInfo(Converter, object):
@cached
def getText(self):
+ if not config.usage.tspinfo_in_channelselection.value:
+ return ""
service = self.source.service
if isinstance(service, iPlayableServicePtr):
info = service and service.info()
diff --git a/lib/python/Components/UsageConfig.py b/lib/python/Components/UsageConfig.py
index 99fabeb..60a04f5 100644
--- a/lib/python/Components/UsageConfig.py
+++ b/lib/python/Components/UsageConfig.py
@@ -63,6 +63,7 @@ def InitUsageConfig():
config.usage.ok_is_channelselection = ConfigYesNo(default = False)
config.usage.volume_instead_of_channelselection = ConfigYesNo(default = False)
config.usage.channelselection_preview = ConfigYesNo(default = False)
+ config.usage.tspinfo_in_channelselection = ConfigYesNo(default = False)
config.usage.show_spinner = ConfigYesNo(default = True)
config.usage.enable_tt_caching = ConfigYesNo(default = True)
choicelist = []
--
1.9.1