From c4c44fa16a96fec7e3956363c35e6dd9f32365a4 Mon Sep 17 00:00:00 2001 From: Robert McNamara Date: Mon, 2 Apr 2012 20:57:05 -0700 Subject: [PATCH] DVR Service: Fix recording deletion API. As with a few other APIs, this was developed on a slave backend, where a remote delete request could work. As the best/correct use of the APIs is to speak to the MBE, allow the API to work by sending the deletion mythmessage. Testing and working with proper UTC input. Fixes #10540. --- mythtv/programs/mythbackend/services/dvr.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/mythtv/programs/mythbackend/services/dvr.cpp b/mythtv/programs/mythbackend/services/dvr.cpp index d12b765cbdb..0949cb9ab96 100644 --- a/mythtv/programs/mythbackend/services/dvr.cpp +++ b/mythtv/programs/mythbackend/services/dvr.cpp @@ -27,6 +27,7 @@ #include "compat.h" #include "mythversion.h" #include "mythcorecontext.h" +#include "mythevent.h" #include "scheduler.h" #include "autoexpire.h" #include "jobqueue.h" @@ -183,8 +184,18 @@ bool Dvr::RemoveRecorded( int nChanId, ProgramInfo *pInfo = new ProgramInfo(nChanId, dStartTime); + QString cmd = QString("DELETE_RECORDING %1 %2") + .arg(nChanId) + .arg(dStartTime.toString(Qt::ISODate)); + MythEvent me(cmd); + + LOG(VB_GENERAL, LOG_INFO, cmd); + if (pInfo->HasPathname()) - bResult = RemoteDeleteRecording(nChanId, dStartTime, true, false); + { + gCoreContext->dispatch(me); + bResult = true; + } return bResult; }