Hi All,
I wonder if it is applicable to get information about the current working channel on the system. Also, can I add an event handler when channel is changed?
Posted 12 June 2016 - 08:48
1. You can get EventInfo of current event from session globals, at least that's how I do it.
event = self.session.screen["Event_Now"].getEvent()
You can look how it's used for example in enigma2 sources in EventView.py
2. Yes, you can create ServiceEventTracker, register it to your screen and map event like evStart to trigger your function when new event starts:
self.__event_tracker = ServiceEventTracker(screen=self, eventmap= { iPlayableService.evStart: self.__serviceChanged, })
For more examples just look in enigma2 sources for ServiceEventTracker.
Posted 12 June 2016 - 21:17
What a great community of OpenSource developers you are here, helping out each other ...
He asked about infos on he channel so you probably need to know first which one is running.
import NavigationInstance cur_ref = NavigationInstance.instance.getCurrentlyPlayingServiceReference() if cur_ref is not None: cur_serv=cur_ref.toString() print cur_serv
Edited by gutemine, 12 June 2016 - 21:19.
Posted 12 June 2016 - 21:29
Behave yourself, there is no need to be sarcastic.
mx3L might as well have missed the first part of the question. There is no indication whatsoever that he did that on purpose.
Without that comment perhaps people would mistakenly have believed you were part of that great community too. On the plus side, good to see you're not falling out of your usual role...
Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Ultimate (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)
Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.
Many answers to your question can be found in our new and improved wiki.
Posted 12 June 2016 - 23:36
Great support guys. Thank you all. I succeeded now to get the current playing channel. I need now to get more info about it. I managed to get its number using
cur_ref.getChannelNum()
I also need to get its name, frequency , and other descriptive info.
I tried
cur_ref.getName()
and
cur_ref.getData()
but unfortunately both return empty string. What am I missing? I appreciate your help very much
Edited by Mouneer, 12 June 2016 - 23:37.
Posted 13 June 2016 - 09:43
Honestly, it's a great honor for me to have you all at my first post at OpenPLI forum. Pleased to meet you, guys.
Back to my question:
I want to get all info about the currently playing service. getName() returns empty string and getData() needs arguments. And originally I don't know whether these methods give my info like channel name, satalite, frequency, Polarization, FEC, Symbol Rate and finally how long has the channel been watched at the time of my inquery - or not. I don't know from where to start. I indeed need all your help, guys.
Waiting your valuable replies.
Edited by Mouneer, 13 June 2016 - 09:45.
Posted 14 June 2016 - 04:59
I don't have direct answer to your question since I don't have experience with this, but I would try to look for keywords in source files of enigma2, then look in most probable source files how it's used.
marko@ openpli-enigma2 $grep -Irsl getData lib/ lib/python/Screens/NetworkSetup.py lib/python/Screens/ChannelSelection.py lib/python/enigma.py lib/python/Plugins/SystemPlugins/CommonInterfaceAssignment/plugin.py lib/python/Plugins/SystemPlugins/WirelessLan/Wlan.py lib/python/Plugins/SystemPlugins/WirelessLan/plugin.py lib/python/Plugins/SystemPlugins/NetworkWizard/NetworkWizard.py lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py lib/python/Plugins/Extensions/MediaPlayer/plugin.py lib/python/Plugins/Extensions/DVDBurn/TitleProperties.py lib/python/Plugins/Extensions/PicturePlayer/ui.py lib/python/Components/HdmiCec.py lib/python/enigma_python.cpp lib/gdi/picload.h lib/gdi/picload.cpp lib/service/servicedvbstream.cpp lib/service/servicedvbrecord.cpp lib/service/iservice.h lib/service/servicets.cpp lib/service/servicemp3.cpp lib/service/servicewebts.cpp lib/service/servicedvb.cpp lib/network/xmlrpc.h lib/network/xmlrpc.cpp lib/driver/hdmi_cec.h lib/driver/hdmi_cec.cpp lib/dvb/frontend.cpp lib/dvb/pmt.h lib/dvb/frontend.h lib/dvb/idvb.h lib/dvb/dvb.cpp lib/dvb/fbc.cpp lib/dvb/pmt.cpp lib/dvb/sec.cpp
So I guess how to use getData on channel could be in ChannelSelection.py?
For polarization keyword:
marko@ openpli-enigma2 $grep -Iirsl polarization lib/ lib/python/Screens/Dish.py lib/python/Screens/ScanSetup.py lib/python/Screens/ServiceInfo.py lib/python/Tools/Transponder.py lib/python/Plugins/SystemPlugins/PositionerSetup/plugin.py lib/python/Plugins/SystemPlugins/Satfinder/plugin.py lib/python/Components/Converter/TransponderInfo.py lib/python/Components/Converter/PliExtraInfo.py lib/python/Components/NimManager.py lib/python/python_helpers.cpp lib/dvb/frontend.cpp lib/dvb/idvb.h lib/dvb/fastscan.h lib/dvb/fastscan.cpp lib/dvb/frontendparms.h lib/dvb/db.cpp lib/dvb/frontendparms.cpp
So Transporder.py or ServiceInfo.py for polarization, etc...
Need urgently progmam for editing settings -channels / for EDISION OS MIO+ 4K S2X + S2 / T2 / CStarted by kemche, 25 Nov 2021 channel, bouquets editor, editor and 2 more... |
|
|||
Audio channel selection not workingStarted by nautilus7, 5 Sep 2015 audio, channel, stereo, left and 1 more... |
|
|||
Clean Bouquet ListStarted by jtadeia, 4 Feb 2014 channel, bouquet, list |
|
|||
sos usb hardisk and recordingStarted by casperch, 13 Mar 2013 vusolo, openpli, usb, hardisk and 1 more... |
|
|||
New user: question about channel selection, and the EPGStarted by polomora, 17 Oct 2012 channel, EPG |
|
0 members, 2 guests, 0 anonymous users