[mythtv] Scheduling bug with instant record.

Chris Pinkham cpinkham at bc2va.org
Tue Nov 18 21:43:47 EST 2003


> > Modified to use filename using current time when recordings are
> >    started late.  This also allows catching the end of a program in a
> >    different filename if the backend is restarted during a recording.
> >    The scheduler now tweaks the in-memory starttime to match the actual
> >    current time when a recording starts.
> 
> This works beautifully. Not only in testing but on Sunday
> I inadvertently killed a backend in the second hour of a
> three hour recording. Once I'd noticed this and restarted
> it, both parts were viewable and seeking worked correctly
> in both. Thank you, Chris.

I did the same thing last night with my wife's "CSI: Miami."  Killed the
backend about 40 minutes into the show because I wanted to update and
then realized a show was recording so I restarted the backend real quick.
Now there's 2 entries, one 40 minutes long (shown as 60 since the end time
didn't get updated since I killed the backend) and another that's 20
minutes long.


> The show is being recorded on card 1 and therefore the
> scheduler should not occupy card 2 with the same title.
> I imagine that this may be another recstartts and startts
> mismatch somewhere.

I looked into this a little and believe it is because the conflicts screen
does not get its info from the scheduler.  It gets info using
QUERY_GETALLPENDING which is handled by
MainServer::HandleGetPendingRecordings which creates a new scheduler
instance to get a list of pending recordings.  We should probably make
MainServer::HandleGetPendingRecordings get it's info from the existing
scheduler rather than creating a new scheduler.  It looks like a lot of
places in mainserver.cpp create their own scheduler instance in order to
get a list of recordings which may or may not match the real scheduler's
lists since they don't have access to the DontRecordList, etc. in the
real scheduler:

MainServer::HandleGetPendingRecordings()
	uses sched->getAllPending();

MainServer::HandleGetScheduledRecordings()
	uses sched->getAllScheduled();

MainServer::HandleGetConflictingRecordings()
	uses sched->getConflicting();

MainServer::PrintStatus()
	uses sched->getAllPending();

It almost looks like we could just pass in the active scheduler to mainserver
and have mainserver just get the lists from the scheduler rather than
creating a new instance.

Comments?

-- 

Chris



More information about the mythtv-dev mailing list