[mythtv] GetProgramGuide does not return the good program list

Paul Harrison mythtv at dsl.pipex.com
Wed Sep 17 17:21:18 UTC 2008


xavier hervy wrote:
> Hi,
>
> After reading the mythxml.cpp source code , I believe the function
> GetProgramGuide does not return the right subset of programs.
>
>
> the function use the following parameters StartTime, EndTime,
> NumOfChannels, StartChanId and Details
>
> At the moment the function return the programs which start at or after
> "StartTime" and finish before or at "EndTime"
>
> 543 QString sSQL = "WHERE program.chanid >= :StartChanId "
> 544                "AND program.chanid <= :EndChanId "
> 545                "AND program.starttime >= :StartDate "
> 546                "AND program.endtime <= :EndDate "
> 547                "GROUP BY program.starttime, channel.channum, "
> 548                "channel.callsign, program.title "
> 549                "ORDER BY program.chanid ";
>
>
> To build a programs guide, I would expect the function to return the
> program guide between StartTime and EndTime for the channel StartChanId
> and the following (NumOfChannels-1) channel(s). 
> Including:
> programs which start before Starttime and finish after EndTime
> programs which start at or after Starttime and start before EndTime
> programs which ends after Starttime and finish at or before EndTime
> as bellow:
> WHERE program.chanid >= :StartChanId 
> AND program.chanid <= :EndChanId 
> AND ( 
> ( program.starttime <= :StartDate AND   program.endtime >= :StartDate ) 
>   OR 
> ( program.starttime >= :StartDate AND   program.endtime > :StartDate )
>  OR 
> ( program.starttime < :EndDate AND program.endtime <= :EndDate ) 
> )
> GROUP BY program.starttime, channel.channum, 
> channel.callsign, program.title 
> ORDER BY program.chanid 
> Do I miss something obvious or should I open a trac ticket and submit a
> patch ?
>
> Regards,
> Xavier
>
>
>   

There's already a ticket open for this. 
http://cvs.mythtv.org/trac/ticket/4956.

Maybe you could test the patch there and report if it works as you would 
expect which would help whoever eventually decides to look at this.

Paul H.


More information about the mythtv-dev mailing list