[mythtv] delete_recording & the rerecord option

Chris Pinkham cpinkham at bc2va.org
Tue Apr 17 03:46:41 UTC 2012


* On Mon Apr 16, 2012 at 11:24:21PM -0400, George Nassas wrote:
> Problem is there are two handlers for DELETE_RECORDING: one in
> MainServer::ProcessRequestWork which recognizes the rerecord option,
> and one in MainServer::customEvent which does not. The services api
> calls customEvent which rejects the "FORGET" keyword.

One of these is for handling requests from frontends (the
ProcessRequestWork version) and one is for handling delete requests
from other threads within mythbackend like the services API.

> So, what's going on here? More important is how to fix it. I can correct
> the customEvent piece but I suspect the better choice is to remove it
> and have the logic fall through to the other function assuming that's
> how it works.

ProcessRequestWork is only for handling requests received over a socket.
I think that you can replicate the logic from the DELETE_RECORDING
handling inside ProcessRequestWork so that you check for optional
arguments in the customEvent handling code and then you can have the
services API send the optional FORGET argument and pass true as the
last argument to HandleDeleteRecording.

Also good would be to call HandleDeleteRecording() instead of
DoHandleDeleteRecording() inside the customEvent handler so that you
can simplify that code and let HandleDeleteRecording() do the
RecordingInfo lookup for you.  If you do that, modify
HandleDeleteRecording() so that it handles a NULL PlaybackSock pointer
being passed in.
  
> Wise counsel requested.

Hope it was supplied. :)  Thanks for taking a look at making a patch.

--
Chris


More information about the mythtv-dev mailing list