[mythtv-commits] Ticket #859: QDateTime comparison in
EncoderLink::MatchesRecording causes problems because of miliseconds
MythTV
mythtv at cvs.mythtv.org
Fri Dec 23 08:14:47 EST 2005
#859: QDateTime comparison in EncoderLink::MatchesRecording causes problems
because of miliseconds
-------------------------------------------------+--------------------------
Reporter: torbjorn.jansson at mbox200.swipnet.se | Owner: ijr
Type: defect | Status: new
Priority: minor | Milestone:
Component: mythtv | Version:
Severity: medium |
-------------------------------------------------+--------------------------
There is a problem in EncoderLink::MatchesRecording
This code:
{{{
#!cpp
if (tvrec->chanid == rec->chanid &&
tvrec->recstartts == rec->recstartts)
}}}
Will never be true because tvrec->recstartts contains miliseconds and
rec->recstartts does not (ProgramInfo To/From String functions only uses
seconds)
This causes the CHECK_RECORDING command to the backend to never find the
recording.
I suspect the cause of this is a QDateTime::currentDateTime() somewere but
i haven't found which one.
The easy fix for this is to change the recstartts check to something like:
{{{
#!cpp
tvrec->recstartts.toTime_t() == rec->recstartts.toTime_t()
}}}
I don't know if there are other places in the code that have similar
problems, QDateTime::currentDateTime() is used in lots of places and
therefor many of the QDateTime variables can contain miliseconds.
And another thing, is there a reason for not having a break in the for
loop in MainServer::HandleCheckRecordingActive ?
Can the exact same recording be recording on more than one recorder at the
same time?
--
Ticket URL: <http://svn.mythtv.org/trac/ticket/859>
MythTV <http://www.mythtv.org/>
MythTV
More information about the mythtv-commits
mailing list