[mythtv] GetProgramGuide does not return the good program list
Xavier Hervy
xavier.hervy at bluebottle.com
Wed Sep 17 17:38:37 UTC 2008
Paul Harrison wrote:
> 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.
>
I should search before ...
> 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.
>
Seems to do the same but in a more simple way. I should study boole's
logic a bit more :)
> Paul H.
>
I will try and report on it...
Xavier
More information about the mythtv-dev
mailing list