Posts by webdef

    1) The posted epglist.py is not running on my Vuduo: it is a more recent version (also available on GitHub) and needs a lot of other files to run (.py, .png, ...)

    So cannot help for that version.

    2) Bouquet and EPG

    After analysis of a lot of code, I come to the conclusion (but I can be wrong !) that the bouquet is not populated by query on the EPG DB (code has been modified to intercept all calls with 4097, ...) BUT, for performance reason, the bouquet is populated by a lookup ... IN THE EPGCACHE !

    A statement like:

    event = self.epgcache.lookupEventId(service.ref, eventid)

    With my limited python knowlegde, I was not able to check/modify service.ref for 4097, ... !


    So far, taking now some holidays in Spain, back M10.

    It doesn't work in ATV, it causes a crash when trying to populate the single EPG and I've simply not had the time due to work, to solve it yet.


    Fixing the crash will be child's play, but finding the reason why the current events are not populated from Bouquets will take more time than I have at the moment.


    So hopefully, webdef will find a solution soon.

    I just make a new test with the posted files (as I have removed the debugging code in the posted files): no problem, all is working !

    Please, send me more info on the reason of the crash ! Crash log or on the screen, last lines give the reason of the crash ... and I will check if it has something to do with EPG.

    can i use it on openatv image? i see that openatv use "pyo" extension and not "py"

    No problem: just replace the original .py files by the posted files: they will be recompiled automaticcaly into .pyo files !

    File .py = source code; File .pyo = compiled version of the source code.

    Some improvements !

    When playing an IPTV channel:

    <EPG>: give details on current event

    <EPG> -> <yellow>: give list of events for the day for the channel

    <EPG> -> <blue>: give the current events for all channels of the bouquet

    At this point, <blue>: go forward in time and show events for all channels and <yellow> go backward.


    Limitations:

    When selecting a bouquet, current events are not shown: problem is identified but need some more Python knowledge to improve !

    Graphical EPG does not show IPTV channels: got less priority as it is more "cosmetics"


    Some feedback:

    When booting on IPTV channel, date/time of the box not correct and EPG is not loaded: need either to select a sat channel (time is taken from sat transponder) or to have a system time plugin (to get time from internet): in both case, restart GUI is necessary to load EPG.

    When own EPG is created (ex: using epgimport with channels.channels.xml file), EPG has sometimes to be re-imported to be visible !


    Let me know your feedback.

    ENJOY


    If you like graphical EPG for IPTV channels:

    In Plugins/GraphMultiEPG, replace GraphMultiEpg.py by the attachment !

    Do not forget to replace gstreamer 4097 by your player code !

    ENJOY

    About Channels list not filled: got the same problem but it is OK if you restart GUI ... Don't know why !

    I have found the reason why channels list is not filled !

    To workaround that problem, I need Python expertise to modify a "list of list of tuples" ... working on that point.

    Solved: at least in my case but should be valid for all !


    Context:


    My STB plays SAT TV channels with #SERVICE starting with 1: and IPTV channels with #SERVICE starting with 4097:


    Historical context:


    When BH was created, only SAT TV channels exist and the convention of #SERVICE starting with 1: was taken to identify them together with SID, TSID, ONID received from the satellite and stored in the file lamedb.


    In the same spirit, EPG data base is created for #SERVICE starting with 1: (and nothing else).


    Creation of IPTV channels in bouquets:


    The IPTV channel is usually of the form:


    #SERVICE 4097:0:1:1067:0:0:0:0:0:0:http%3a//mystream/750.ts


    where 1067 is just a sequence number in my list of IPTV channels.


    As explained in many forums, there are 2 approaches to get EPG:


    either you modify the SERVICE to introduce SID, TSID and ONID of the same channel on satellite


    #SERVICE 4097:0:19:245B:440:1:C00000:0:0:0:http%3a//mystream/750.ts


    or you create your own EPG with


    < channel id="Rytec ID of the channel">1:0:1:1067:0:0:0:0:0:0:http%3a//dummy.com</channel>


    Note: in this case, you may not use 4097: but only 1: (see historical context).



    Well, after all this stuff ... EPG is still not working for IPTV channels.


    The explanation is the following:


    BH calls the functions of the component EpgList.py to process the EPG requests and that is the problem !


    If the #SERVICE starts with 4097:, nothing will be found in the EPG data base as all references start with 1:.



    The solution is to modify EpgList.py functions like the following (and this should be valid for all images!):



    Original code for single EPG:

    Code
     test = [ 'RIBDT', (service.ref.toString(), 0, -1, -1) ]
     self.list = self.queryEPG(test)


    Note: a query on EPG data base is made for 1 "service"



    Modified code for IPTV:

    Code
     mywork=service.ref.toString()
     if mywork.startswith("4097:"):
         service2=mywork.replace("4097:","1:",1)
     else:
         service2=mywork
     test = [ 'RIBDT', (service2, 0, -1, -1) ]
     self.list = self.queryEPG(test)



    Original code for multi EPG:

    Code
     test = [ (service.ref.toString(), 0, stime) for service in services ]
     self.list = self.queryEPG(test)


    Note: a query on EPG data base is made for all services in "services"



    Modified code for IPTV:

    Code
     test=[]
     for service in services:
         mywork=service.ref.toString()
         if mywork.startswith("4097:"):
             service2=mywork.replace("4097:","1:",1)
        else:
             service2=mywork
         test.append((service2, 0, stime))
     test.insert(0, 'X0RIBDTCn')
     self.list = self.queryEPG(test)



    After modification, EpgList.py will be re-compiled automatically.



    Enjoy !!!