Jump to content


Photo

EPG when using 5002


  • Please log in to reply
10 replies to this topic

#1 ian1095

  • Senior Member
  • 462 posts

+6
Neutral

Posted 8 August 2017 - 15:20

Can someone tell me what I'm missing here please ? I think its something to do with the append, but I'm stuck as to what I've done wrong.

 

The single EPG part works perfectly with this modified code to allow EPG to show when Streams in my Bouquets are flagged as 5002 instead of 1 but the Multi EPG doesn't populate. The code is from my modified EpgList.py

    def fillSingleEPG(self, service):
        t = time()
        epg_time = t - config.epg.histminutes.value * 60
        ext3=service.ref.toString()
        if ext3.startswith("5002:"):
            service2=ext3.replace("5002:","1:",1)
        else:
            service2=ext3        
        test = [ 'RIBDT', (service2, 0, -1, -1) ]
        self.list = self.queryEPG(test)
        self.l.setList(self.list)
        if t != epg_time:
            idx = 0
            for x in self.list:
                idx += 1
                if t < x[2] + x[3]:
                    break

            self.instance.moveSelectionTo(idx - 1)
        self.selectionChanged()

    def fillMultiEPG(self, services, stime = None):
        test = [ ]
        for service in services:        
            ext3=service.ref.toString()
        if ext3.startswith("5002:"):
            service2=ext3.replace("5002:","1:",1)
        else:
            service2=ext3
        test.append((service2, 0, stime))            
        test.insert(0, 'X0RIBDTCn')
        self.list = self.queryEPG(test)
        self.l.setList(self.list)
        self.selectionChanged()

Edited by ian1095, 8 August 2017 - 15:21.


Re: EPG when using 5002 #2 littlesat

  • PLi® Core member
  • 56,123 posts

+685
Excellent

Posted 21 August 2017 - 11:18

        ext3=service.ref.toString()
        if ext3.startswith("5002:"):
            service2=ext3.replace("5002:","1:",1)
        else:
            service2=ext3     
 
--->
 
import re (once on top)
then...

service2 = re.sub('^5002:', '1:', service.ref.toString())

Edited by littlesat, 21 August 2017 - 11:18.

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: EPG when using 5002 #3 ian1095

  • Senior Member
  • 462 posts

+6
Neutral

Posted 21 August 2017 - 20:44

Thanks Littlesat, but sadly that's made no difference.

 

Single EPG is still perfect, but the Multiepg still doesnt populate, nor does the EPG in the Bouquets list.



Re: EPG when using 5002 #4 ian1095

  • Senior Member
  • 462 posts

+6
Neutral

Posted 21 August 2017 - 20:56

Cant edit my post.

 

Adding your code has however fixed the Graph MultiEPG.

 

So when using 5002

 

Single EPG- Working

Graph MultiEPG - Working

MultiEPG- Still not populating.



Re: EPG when using 5002 #5 littlesat

  • PLi® Core member
  • 56,123 posts

+685
Excellent

Posted 21 August 2017 - 23:00

The multieepg code can only fatch the latest service in a servicelist as the code is presented here. I speculate there are some indent issues there...

Edited by littlesat, 21 August 2017 - 23:01.

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: EPG when using 5002 #6 ian1095

  • Senior Member
  • 462 posts

+6
Neutral

Posted 22 August 2017 - 07:15

Ok this fixes MultiEPG so its now 90% working.

 

    def fillMultiEPG(self, services, stime = None):
        for service in services:
            ext3 = service.ref.toString()
        if ext3.startswith("5002:"):
            service2 = re.sub('^5002:', '1:', service.ref.toString())
        else :
            service2 = ext3
        test = [ (service.ref.toString(), 0, stime) for service in services ]            
        test.append((service2, 0, stime))
        test.insert(0, 'X0RIBDTCn')
        self.list = self.queryEPG(test)
        self.l.setList(self.list)
        self.selectionChanged()

 

The only thing left now is the EPG list from Bouquets. I'm beginning to think this is populated from a separate file altogether, can anyone shed any light on this please ?

 

Ian.



Re: EPG when using 5002 #7 littlesat

  • PLi® Core member
  • 56,123 posts

+685
Excellent

Posted 22 August 2017 - 08:30

From the if ext3 =.... Upto test.insert.... The lines need to indent one tab to the right... Then the code makes sense... And please change to the oneliner with re usage to change the service reference...

Edited by littlesat, 22 August 2017 - 08:33.

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: EPG when using 5002 #8 littlesat

  • PLi® Core member
  • 56,123 posts

+685
Excellent

Posted 22 August 2017 - 08:54

    def fillMultiEPG(self, services, stime = None):
        test = [ (re.sub('^5002:', '1:', service.ref.toString()), 0, stime) for service in services ]            
        test.insert(0, 'X0RIBDTCn')
        self.list = self.queryEPG(test)
        self.l.setList(self.list)
        self.selectionChanged()

 

???


Edited by littlesat, 22 August 2017 - 08:54.

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: EPG when using 5002 #9 ian1095

  • Senior Member
  • 462 posts

+6
Neutral

Posted 22 August 2017 - 09:56

Ok I've done everything you said but the Bouquets list still doesnt populate when using 5002

 

Everything else is working though.

    def fillMultiEPG(self, services, stime = None):
        test = [ ]
        for service in services:        
            ext3=service.ref.toString()
            if ext3.startswith("5002:"):
                service2 = re.sub('^5002:', '1:', service.ref.toString())
            else:
                service2=ext3
            test.append((service2, 0, stime))            
        test.insert(0, 'X0RIBDTCn')
        self.list = self.queryEPG(test)
        self.l.setList(self.list)
        self.selectionChanged()

Edited by ian1095, 22 August 2017 - 09:56.


Re: EPG when using 5002 #10 ian1095

  • Senior Member
  • 462 posts

+6
Neutral

Posted 24 August 2017 - 11:23

 I now believe that the correct def to modify to get the EPG list to show in Bouquets when using 5002 is this one

 

def getEventFromId(self, service, eventid):

 

But this modified code doesnt work, so I'm still stuck.

    def getEventFromId(self, service, eventid):
        event = None
        if self.epgcache is not None and eventid is not None:
            service2 = service
            ext3=str(service)
            if ext3.startswith("5002:"):
                service2=  [b]??? [/b]ext3.replace("5002:","1:",1)
            event = self.epgcache.lookupEventId(service2.ref, eventid)
        return event

Would using this be better ?  I cannot understand why no image writers have addressed this issue ?

service.ref.toString().replace(

Edited by ian1095, 24 August 2017 - 11:27.


Re: EPG when using 5002 #11 ian1095

  • Senior Member
  • 462 posts

+6
Neutral

Posted 24 August 2017 - 11:32

Forgot to say the above gives invalid syntax.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users