transponder info of current service

  • Hi guys
    I'm writing a new plugin.


    1.how can i get transponder info of current service(tv channel) like freq, symrate,Pol,pids(SID,PMTPID,ECMPID) and save this as string data.I don't want this info for skin.


    2.which module files should be imported? like this :
    from enigma import iServiceInformation, eTimer, eDVBFrontendParametersSatellite


    3. how can i find all properties of a module like iServiceInformation or others?. I just find PluginDescriptor in /usr/lib/enigma2/python/Plugins/Plugin.py


    thanks a lot

  • 1. There is an existing screen which shows this data. Use this one as your starting point.
    2. see 1. in general: everything you take from other classes
    3. enigma.py

    Gruss
    Dre


    Boxen (im Einsatz): DM920, DM900, DMOne
    Developer Project Merlin - we are OpenSource

  • I know all renders and converters that show all info about current tv channel in screen or writing a skin.


    I want to know which function shows this Info like following term for screen width size : getDesktop(0).size().width()


    I want this Info for writing in python code of plugin and assign out of function to a variable.


    please help me.


    thanks a lot

    Einmal editiert, zuletzt von momi133 ()

  • Zitat

    momi133 schrieb:
    I want to know which function shows this Info like following term for screen width size : getDesktop(0).size().width()
    I want this Info for writing in python code of plugin and assign out of function to a variable.

    I hope i have understand you correctly :winking_face:


    You can use this if your function is from a class:

    Python
    class Classname(...):
    	def __init__(self, ...):
                 self.DesktopWidth = getDesktop(0).size().width()
    
    
            def function1():
                newDesktopWidth = self.DesktopWidth -200

    Then you can use self.DesktopWidth in other functions of the class.


    If you have a Plugin-Function without a class, then you can use a global variable:

    Gruß Sven (aka Dreamy)


    DM920 mit unstable OE2.5 DP
    One mit unstable OE2.6 DP

  • Global variables should be avoided whenever possible. Pass variables from one class to an other as parameter

    Gruss
    Dre


    Boxen (im Einsatz): DM920, DM900, DMOne
    Developer Project Merlin - we are OpenSource