Get cam name ?!

Wir haben aktuell ein Problem mit dem Board und arbeiten an der Lösung...
  • Hi friends ...


    I have some render on my plugin include code to get name of cam to all image and panel ..


    Before on GP3 I have use this code


    And one cam please edit it to me for Gp4 ?! Because some file in Gp4 Panel closed I can not get cam name code from it ..


    Thank you

    • Offizieller Beitrag
    Python
    from Plugins.GP4.geminicamswitch.gscamtools import readjsons
    
    
    camdlist=[]
    camdlist=readjsons()
    
    
    print camdlist
  • Thank you my friend ..
    But that code does't give me name of active emu ...
    I need name of running emu for example if oscam active or cccam ..
    The code should be to given me name of emu ..


    I have use the code like this

    Python
    elif fileExists("/usr/lib/enigma2/python/Plugins/GP4/geminicamswitch/gscamtools.so"):
                            try:
                                    from Plugins.GP4.geminicamswitch.gscamtools import readjsons
                                    camdlist=[]
                                    camdlist=readjsons()
                                    return camdlist
                            except:
                                    return None


    Thank you

    • Offizieller Beitrag
    Code
    for x in readjsons():
    	if 'name' in x and 'binary' in x:
    		if x['binary']==config.gcammanager.currentbinary.value:
    			print "currentcam:",x['name']
  • Thank you my friend ..
    I have use this code and works just fine :winking_face:

    Python
    elif fileExists("/usr/lib/enigma2/python/Plugins/GP4/geminicamswitch/gscamtools.so"):
                                    from Plugins.GP4.geminicamswitch.gscamtools import readjsons
                                    if config.gcammanager.currentbinary.value: 
                                            return config.gcammanager.currentbinary.value