Forum Discussion

3 Replies

  • Any help please I want to be able to make them change the listing by category
  • EPGGrid.xml
    <?xml version="1.0" encoding="utf-8" ?> 

    <component name="customEPGGrid" extends="EPGGrid" >

        <children>

        <ContentNode id = "coreList" role = "content" />
      
            <ParseEpg
                id="ParseEpg"/>

        </children>
     
        <script type="text/brightscript" uri="pkg:/components/EpgGrid.brs"/>
    </component>


    EpgGrid.brs
    ' ********** Copyright 2016 Roku Corp.  All Rights Reserved. **********  

    function init()
       print "EpgGrid.brs"
       
       m.ParseEpg  = m.top.FindNode("ParseEpg")
       m.ParseEpg.uri="http://localhost/channel_epg.php?tipo=6"
       m.ParseEpg.observefield("content","contentdownloaded")
       m.ParseEpg.observefield("category","categorydownloaded")
       m.ParseEpg.functionName = "contentdownloaded"
       m.ParseEpg.control="RUN"
       
       m.list = m.top.FindNode("coreList")
       m.list.SetFocus(TRUE)

       m.top.translation  = [40, 555]
       m.top.numRows = 5
       m.top.duration = 10800
       m.top.nowNextMode = true
       m.top.infoGridGap = 0
       m.top.channelInfoColumnLabel = "Channel"
       m.top.setFocus(true)
       m.top.jumpToItem = 0
      
    End function

    Function contentdownloaded()
    m.parseepg.unobservefield("content")
        m.top.content=m.parseepg.content
    End Function

    Function categorydownloaded()
    m.parseepg.unobservefield("category")
    print "Categoria =>> "; m.parseepg.category
        m.list.content = m.parseepg.category

    End Function