Jump to content


steavebba

Member Since 31 Mar 2017
Offline Last Active 07 Dec 2017 12:53
-----

Posts I've Made

In Topic: current service change notification

25 July 2017 - 07:56

class   Someclass :
  event_callbacks =[]       


 self.session.nav.event.append(Someclass.service_event) # callback shoud be static method 
 Someclass.event_callbacks.append(self.update_service_info)

    @staticmethod
    def service_event(evt):
        if (evt == iPlayableService.evStart):
            print "channel changed....!", evt
            for func in Someclass.event_callbacks:
                print func
                func()

This is how to get notified when some navigation events occur.

Thank you @littlsat for the eventtracker hint.

 

 

 


In Topic: current service change notification

24 July 2017 - 19:43

        service = session.nav.getCurrentService()
        info = service and service.info()
        data = info and info.getInfoObject(iServiceInformation.sTransponderData)
        name = ServiceReference(self.session.nav.getCurrentlyPlayingServiceReference()).getServiceName()
        service_id = self.session.nav.getCurrentlyPlayingServiceReference().toString().split(':')[3] # geting service id from service reference string
        sat_pos = str(data.get("orbital_position", INVALID_POSITION))
        frequency = str(data.get("frequency", 0) / 1000)
        print  name,sat_pos,frequency, service_id

This is how i get the information now how i can avoid pooling this information continuously and  update it only on service change ?


In Topic: current service change notification

24 July 2017 - 18:49

@mervica thank you for the answer, but pooling the state with python timer would be faster i think especially from a pluging context.

 

Thank you @littlsat, the serviceEventTracker used in the infobar dose not effectively help me it needs a screen and i want to watch for service change in the background.

 

i am using a timer to look for channel change every 1 second.

 

But i have not figured out how to get the service ID (sSID)..

    def update_service_info(self):
        service = session.nav.getCurrentService()
        info = service and service.info()
        data = info and info.getInfoObject(iServiceInformation.sTransponderData)
        sref = ServiceReference(self.session.nav.getCurrentlyPlayingServiceReference())
        name = sref.getServiceName()
        print sref.toString()

        cur_orbpos = data.get("orbital_position", INVALID_POSITION)
        cur_freq = data.get("frequency", 0)
        service_id = self.getinfo(iServiceInformation.sSID)
        print  cur_orbpos,cur_freq,name, service_id

In Topic: Custom service list

24 July 2017 - 15:48

thanks for the info erik,

i agree with u that we can not get that information directly from the box, but at list softcams can know if thy can handle a channel or not..

 

imagine that we want to add tagging system to service list where we can assign channels to categories and show the category in the channal list (Sports, news, films, doc .....etc.) enigma doesn’t provide this information but that dose not mean that w can not do it.

what you are answering is not  my question,

 

my question is simply where to add that extra information to be accessible  when the service list is displayed

How to add extra info to the service list and skin the selection screen based on this info.


In Topic: Custom service list

24 July 2017 - 10:55

I know that enigma doesn’t know that,

 

i am planing to provide this information via cache files and descrambling history etc....

 

 

suppose that i have a list for decrypteble channels that i have calculated like this

service_1 TRUE

service_2 FALSE

service_3 FALSE

service_4 TRUE

 

how to add this information to the service list. its like tagging the services based on decryption probability....